diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/IceBox/Server.cpp | 9 | ||||
-rw-r--r-- | cpp/src/IceBox/ServiceManagerI.cpp | 1 | ||||
-rw-r--r-- | cpp/src/IcePack/.depend | 9 | ||||
-rw-r--r-- | cpp/src/IcePack/Activator.ice | 23 | ||||
-rw-r--r-- | cpp/src/IcePack/ActivatorI.cpp | 236 | ||||
-rw-r--r-- | cpp/src/IcePack/ActivatorI.h | 14 | ||||
-rw-r--r-- | cpp/src/IcePack/AdapterManagerI.cpp | 90 | ||||
-rw-r--r-- | cpp/src/IcePack/AdapterManagerI.h | 10 | ||||
-rw-r--r-- | cpp/src/IcePack/AdminI.cpp | 60 | ||||
-rw-r--r-- | cpp/src/IcePack/AdminI.h | 7 | ||||
-rw-r--r-- | cpp/src/IcePack/ApplicationDeployer.cpp | 5 | ||||
-rw-r--r-- | cpp/src/IcePack/Client.cpp | 6 | ||||
-rw-r--r-- | cpp/src/IcePack/ComponentDeployer.cpp | 33 | ||||
-rw-r--r-- | cpp/src/IcePack/ComponentDeployer.h | 6 | ||||
-rw-r--r-- | cpp/src/IcePack/Makefile | 5 | ||||
-rw-r--r-- | cpp/src/IcePack/Server.cpp | 444 | ||||
-rw-r--r-- | cpp/src/IcePack/ServerDeployer.cpp | 12 | ||||
-rw-r--r-- | cpp/src/IcePack/ServerManager.ice | 14 | ||||
-rw-r--r-- | cpp/src/IcePack/ServerManagerI.cpp | 292 | ||||
-rw-r--r-- | cpp/src/IcePack/ServerManagerI.h | 17 | ||||
-rw-r--r-- | cpp/src/IcePack/ServiceDeployer.cpp | 2 | ||||
-rw-r--r-- | cpp/src/IcePack/TraceLevels.cpp | 34 | ||||
-rw-r--r-- | cpp/src/IcePack/TraceLevels.h | 44 |
23 files changed, 1035 insertions, 338 deletions
diff --git a/cpp/src/IceBox/Server.cpp b/cpp/src/IceBox/Server.cpp index 167a419737b..7954e000e14 100644 --- a/cpp/src/IceBox/Server.cpp +++ b/cpp/src/IceBox/Server.cpp @@ -49,9 +49,6 @@ Server::usage() int Server::run(int argc, char* argv[]) { - ServiceManagerPtr serviceManager; - int status; - PropertiesPtr properties = communicator()->getProperties(); StringSeq args = argsToStringSeq(argc, argv); args = properties->parseCommandLineOptions("IceBox", args); @@ -78,8 +75,6 @@ Server::run(int argc, char* argv[]) } ServiceManagerI* serviceManagerImpl = new ServiceManagerI(this, argc, argv); - serviceManager = serviceManagerImpl; - status = serviceManagerImpl->run(); - - return EXIT_SUCCESS; + ServiceManagerPtr serviceManager = serviceManagerImpl; + return serviceManagerImpl->run(); } diff --git a/cpp/src/IceBox/ServiceManagerI.cpp b/cpp/src/IceBox/ServiceManagerI.cpp index b39622d032a..ab79dfe2c8c 100644 --- a/cpp/src/IceBox/ServiceManagerI.cpp +++ b/cpp/src/IceBox/ServiceManagerI.cpp @@ -160,6 +160,7 @@ IceBox::ServiceManagerI::run() _server->shutdownOnInterrupt(); _server->communicator()->waitForShutdown(); + _server->ignoreInterrupt(); // // Invoke stop() on the services. diff --git a/cpp/src/IcePack/.depend b/cpp/src/IcePack/.depend index 3061cf45932..071ae967ca6 100644 --- a/cpp/src/IcePack/.depend +++ b/cpp/src/IcePack/.depend @@ -6,9 +6,9 @@ Grammar.o: Grammar.cpp ../../include/Ice/Ice.h ../../include/Ice/Initialize.h .. Scanner.o: Scanner.cpp ../../include/IceUtil/Config.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Facet.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h ../IcePack/Parser.h ../../include/IcePack/Admin.h ../IcePack/Grammar.h Parser.o: Parser.cpp ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Facet.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h ../IcePack/Parser.h ../../include/IcePack/Admin.h Client.o: Client.cpp ../../include/Ice/Application.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Facet.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h ../IcePack/Parser.h ../../include/IcePack/Admin.h -Server.o: Server.cpp ../../include/Freeze/Application.h ../../include/Ice/Application.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Facet.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h ../../include/Freeze/Freeze.h ../../include/Freeze/Initialize.h ../../include/Freeze/DBF.h ../../include/Freeze/DB.h ../../include/Freeze/DBException.h ../../include/Freeze/EvictorF.h ../../include/Freeze/Evictor.h ../../include/Freeze/Map.h ../IcePack/LocatorI.h ../../include/Ice/Locator.h ../IcePack/AdapterManagerF.h ../IcePack/LocatorRegistryI.h ../IcePack/ServerManagerI.h ../IcePack/ServerManager.h ../../include/IcePack/Admin.h ../IcePack/AdapterManager.h ../IcePack/Activator.h ../IcePack/ServerManagerF.h ../IcePack/AdapterManagerI.h ../IcePack/AdminI.h ../IcePack/ActivatorI.h ../../include/IceUtil/Thread.h -AdapterManagerI.o: AdapterManagerI.cpp ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Facet.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h ../../include/Freeze/DB.h ../../include/Freeze/DBException.h ../../include/Freeze/DBF.h ../../include/Freeze/EvictorF.h ../../include/Freeze/Evictor.h ../IcePack/AdapterManagerI.h ../IcePack/AdapterManager.h ../../include/IcePack/Admin.h ../IcePack/ServerManager.h -ServerManagerI.o: ServerManagerI.cpp ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Facet.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h ../../include/Freeze/DB.h ../../include/Freeze/DBException.h ../../include/Freeze/DBF.h ../../include/Freeze/EvictorF.h ../../include/Freeze/Evictor.h ../../include/Ice/Functional.h ../../include/IceUtil/Functional.h ../IcePack/ServerManagerI.h ../IcePack/ServerManager.h ../../include/IcePack/Admin.h ../IcePack/AdapterManager.h ../IcePack/Activator.h ../IcePack/ServerManagerF.h ../IcePack/ServerDeployer.h ../IcePack/ComponentDeployer.h ../../include/Yellow/Yellow.h ../IcePack/AdapterManagerF.h +Server.o: Server.cpp ../../include/Ice/Application.h ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Facet.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h ../../include/Freeze/Freeze.h ../../include/Freeze/Initialize.h ../../include/Freeze/DBF.h ../../include/Freeze/DB.h ../../include/Freeze/DBException.h ../../include/Freeze/EvictorF.h ../../include/Freeze/Evictor.h ../../include/Freeze/Map.h ../IcePack/LocatorI.h ../../include/Ice/Locator.h ../IcePack/AdapterManagerF.h ../IcePack/LocatorRegistryI.h ../IcePack/ServerManagerI.h ../IcePack/ServerManager.h ../../include/IcePack/Admin.h ../IcePack/AdapterManager.h ../IcePack/Activator.h ../IcePack/ServerManagerF.h ../IcePack/AdapterManagerI.h ../IcePack/AdminI.h ../IcePack/TraceLevels.h ../IcePack/ActivatorI.h ../../include/IceUtil/Thread.h +AdapterManagerI.o: AdapterManagerI.cpp ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Facet.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h ../../include/Freeze/DB.h ../../include/Freeze/DBException.h ../../include/Freeze/DBF.h ../../include/Freeze/EvictorF.h ../../include/Freeze/Evictor.h ../IcePack/AdapterManagerI.h ../IcePack/AdapterManager.h ../../include/IcePack/Admin.h ../IcePack/ServerManager.h ../IcePack/TraceLevels.h +ServerManagerI.o: ServerManagerI.cpp ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Facet.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h ../../include/Freeze/DB.h ../../include/Freeze/DBException.h ../../include/Freeze/DBF.h ../../include/Freeze/EvictorF.h ../../include/Freeze/Evictor.h ../../include/Ice/Functional.h ../../include/IceUtil/Functional.h ../IcePack/ServerManagerI.h ../IcePack/ServerManager.h ../../include/IcePack/Admin.h ../IcePack/AdapterManager.h ../IcePack/Activator.h ../IcePack/ServerManagerF.h ../IcePack/ServerDeployer.h ../IcePack/ComponentDeployer.h ../../include/Yellow/Yellow.h ../IcePack/AdapterManagerF.h ../IcePack/TraceLevels.h ../../include/IceBox/IceBox.h ComponentDeployer.o: ComponentDeployer.cpp ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Facet.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h ../../include/Ice/Locator.h ../IcePack/ComponentDeployer.h ../../include/IcePack/Admin.h ../../include/Yellow/Yellow.h ServerDeployer.o: ServerDeployer.cpp ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Facet.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h ../IcePack/ServerDeployer.h ../IcePack/ComponentDeployer.h ../../include/IcePack/Admin.h ../../include/Yellow/Yellow.h ../IcePack/ServerManagerF.h ../IcePack/AdapterManagerF.h ../IcePack/ServiceDeployer.h ../IcePack/AdapterManager.h ../IcePack/ServerManager.h ServiceDeployer.o: ServiceDeployer.cpp ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Facet.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h ../IcePack/ServiceDeployer.h ../IcePack/ComponentDeployer.h ../../include/IcePack/Admin.h ../../include/Yellow/Yellow.h ../IcePack/ServerDeployer.h ../IcePack/ServerManagerF.h ../IcePack/AdapterManagerF.h @@ -16,4 +16,5 @@ ApplicationDeployer.o: ApplicationDeployer.cpp ../../include/Ice/Ice.h ../../inc LocatorI.o: LocatorI.cpp ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Facet.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h ../IcePack/AdapterManager.h ../../include/IcePack/Admin.h ../IcePack/LocatorI.h ../../include/Ice/Locator.h ../IcePack/AdapterManagerF.h LocatorRegistryI.o: LocatorRegistryI.cpp ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Facet.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h ../IcePack/AdapterManager.h ../../include/IcePack/Admin.h ../IcePack/LocatorRegistryI.h ../../include/Ice/Locator.h ../IcePack/AdapterManagerF.h AdminI.o: AdminI.cpp ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Facet.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h ../IcePack/AdminI.h ../../include/IcePack/Admin.h ../IcePack/ServerManagerF.h ../IcePack/AdapterManagerF.h ../IcePack/ServerManager.h ../IcePack/AdapterManager.h ../IcePack/ApplicationDeployer.h ../IcePack/ComponentDeployer.h ../../include/Yellow/Yellow.h ../IcePack/ServerDeployer.h -ActivatorI.o: ActivatorI.cpp ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Facet.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h ../IcePack/ActivatorI.h ../../include/IceUtil/Thread.h ../IcePack/Activator.h ../IcePack/ServerManagerF.h ../../include/IcePack/Admin.h ../IcePack/ServerManager.h ../IcePack/AdapterManager.h +ActivatorI.o: ActivatorI.cpp ../../include/Ice/Ice.h ../../include/Ice/Initialize.h ../../include/Ice/CommunicatorF.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/PropertiesF.h ../../include/Ice/InstanceF.h ../../include/Ice/BuiltinSequences.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Facet.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/Ice/BasicStream.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/LocalException.h ../../include/Ice/Properties.h ../../include/Ice/Logger.h ../../include/Ice/LoggerUtil.h ../../include/Ice/LoggerF.h ../../include/Ice/Communicator.h ../../include/Ice/UserExceptionFactoryF.h ../../include/Ice/RouterF.h ../../include/Ice/LocatorF.h ../../include/Ice/PluginF.h ../../include/Ice/ObjectFactory.h ../../include/Ice/UserExceptionFactory.h ../../include/Ice/ObjectAdapter.h ../../include/Ice/ServantLocator.h ../../include/Ice/IdentityUtil.h ../IcePack/ActivatorI.h ../../include/IceUtil/Thread.h ../IcePack/Activator.h ../IcePack/ServerManagerF.h ../../include/IcePack/Admin.h ../IcePack/ServerManager.h ../IcePack/AdapterManager.h ../IcePack/TraceLevels.h +TraceLevels.o: TraceLevels.cpp ../../include/Ice/Properties.h ../../include/Ice/LocalObjectF.h ../../include/Ice/Handle.h ../../include/IceUtil/Handle.h ../../include/IceUtil/Exception.h ../../include/IceUtil/Config.h ../../include/Ice/Config.h ../../include/Ice/ProxyF.h ../../include/Ice/ProxyHandle.h ../../include/Ice/ObjectF.h ../../include/Ice/Exception.h ../../include/Ice/LocalObject.h ../../include/IceUtil/Shared.h ../../include/Ice/StreamF.h ../../include/Ice/Proxy.h ../../include/IceUtil/Mutex.h ../../include/IceUtil/Lock.h ../../include/Ice/ProxyFactoryF.h ../../include/Ice/ConnectionF.h ../../include/Ice/EndpointF.h ../../include/Ice/ObjectAdapterF.h ../../include/Ice/ReferenceF.h ../../include/Ice/Current.h ../../include/Ice/Identity.h ../../include/Ice/Facet.h ../../include/Ice/Object.h ../../include/Ice/Outgoing.h ../../include/IceUtil/Monitor.h ../../include/IceUtil/Cond.h ../../include/IceUtil/Time.h ../../include/Ice/BasicStream.h ../../include/Ice/InstanceF.h ../../include/Ice/Buffer.h ../../include/Ice/ObjectFactoryF.h ../../include/Ice/Incoming.h ../../include/Ice/Direct.h ../../include/Ice/ServantLocatorF.h ../../include/Ice/BuiltinSequences.h ../IcePack/TraceLevels.h ../../include/Ice/PropertiesF.h ../../include/Ice/LoggerF.h diff --git a/cpp/src/IcePack/Activator.ice b/cpp/src/IcePack/Activator.ice index 1bd2cd66664..4cdecbf029a 100644 --- a/cpp/src/IcePack/Activator.ice +++ b/cpp/src/IcePack/Activator.ice @@ -16,7 +16,7 @@ module IcePack { -interface Activator +local interface Activator { /** * @@ -27,6 +27,27 @@ interface Activator * **/ int activate(Server* server); + + /** + * + * Deactivate a server. + * + **/ + void deactivate(Server* server); + + /** + * + * Kill a server. + * + **/ + void kill(Server* server); + + /** + * + * Destroy the activator. + * + **/ + void destroy(); }; }; diff --git a/cpp/src/IcePack/ActivatorI.cpp b/cpp/src/IcePack/ActivatorI.cpp index 10b0043e48d..92654ff8eda 100644 --- a/cpp/src/IcePack/ActivatorI.cpp +++ b/cpp/src/IcePack/ActivatorI.cpp @@ -16,15 +16,21 @@ #include <IcePack/ActivatorI.h> #include <IcePack/Admin.h> #include <IcePack/ServerManager.h> +#include <IcePack/TraceLevels.h> + +#include <sys/types.h> +#include <signal.h> #include <fcntl.h> using namespace std; using namespace Ice; using namespace IcePack; -IcePack::ActivatorI::ActivatorI(const CommunicatorPtr& communicator) : +IcePack::ActivatorI::ActivatorI(const CommunicatorPtr& communicator, const TraceLevelsPtr& traceLevels) : _communicator(communicator), - _destroy(false) + _traceLevels(traceLevels), + _destroy(false), + _deactivating(false) { int fds[2]; if(pipe(fds) != 0) @@ -43,12 +49,10 @@ IcePack::ActivatorI::ActivatorI(const CommunicatorPtr& communicator) : IcePack::ActivatorI::~ActivatorI() { assert(_destroy); + assert(_processes.empty()); + close(_fdIntrRead); close(_fdIntrWrite); - for(vector<Process>::iterator p = _processes.begin(); p != _processes.end(); ++p) - { - close(p->fd); - } } void @@ -73,23 +77,74 @@ IcePack::ActivatorI::run() void IcePack::ActivatorI::destroy() { - IceUtil::Mutex::Lock sync(*this); + { + IceUtil::Mutex::Lock sync(*this); + + if(_destroy || _deactivating) // Don't destroy or deactivate twice. + { + return; + } + + // + // This ensure that no new processes will be activated. + // + _deactivating = true; + } + - if(_destroy) // Don't destroy twice. + // + // Stop all activated processes. + // + while(true) { - return; + ServerPrx server; + { + IceUtil::Mutex::Lock sync(*this); + if(!_processes.empty()) + { + server = _processes.begin()->server; + } + else + { + // + // No more process to deactivate. + // + break; + } + } + + // + // Stop the server. The activator thread should detect the + // process deactivation and remove it from the activator + // active processes. This garantees that this loop will end at + // one point. + // + server->stop(); } - _destroy = true; - setInterrupt(); + // + // Set the state as destroyed, this will cause the + // activator thread to exit. + // + { + IceUtil::Mutex::Lock sync(*this); + + _destroy = true; + setInterrupt(); + } + + // + // Join the activator thread. + // + getThreadControl().join(); } Ice::Int -IcePack::ActivatorI::activate(const ServerPrx& server, const ::Ice::Current&) +IcePack::ActivatorI::activate(const ServerPrx& server) { IceUtil::Mutex::Lock sync(*this); - if(_destroy) + if(_destroy || _deactivating) { return false; } @@ -116,7 +171,58 @@ IcePack::ActivatorI::activate(const ServerPrx& server, const ::Ice::Current&) } // - // Process does not exist, activate and create. + // Normalize the path to the working directory. + // + string pwd = desc.pwd; + if(!pwd.empty()) + { + string::size_type pos; + while((pos = pwd.find("//")) != string::npos) + { + pwd.erase(pos, 1); + } + while((pos = pwd.find("/./")) != string::npos) + { + pwd.erase(pos, 2); + } + } + + // + // Compute arguments. + // + int argc = desc.args.size() + 2; + char** argv = static_cast<char**>(malloc(argc * sizeof(char*))); + argv[0] = strdup(path.c_str()); + unsigned int i = 0; + vector<string>::const_iterator q; + for(q = desc.args.begin(); q != desc.args.end(); ++q, ++i) + { + argv[i + 1] = strdup(q->c_str()); + } + argv[argc - 1] = 0; + + if(_traceLevels->activator > 1) + { + Ice::Trace out(_traceLevels->logger, _traceLevels->activatorCat); + out << "activating server `" << desc.name << "'"; + if(_traceLevels->activator > 2) + { + out << "\n"; + out << "path = " << path << "\n"; + out << "pwd = " << pwd << "\n"; + out << "args = "; + + char **args = argv; + while(*args) + { + out << " " << *args; + args++; + } + } + } + + // + // Activate and create. // int fds[2]; if(pipe(fds) != 0) @@ -183,19 +289,8 @@ IcePack::ActivatorI::activate(const ServerPrx& server, const ::Ice::Current&) // // Change working directory. // - string pwd = desc.pwd; if(!pwd.empty()) { - string::size_type pos; - while((pos = pwd.find("//")) != string::npos) - { - pwd.erase(pos, 1); - } - while((pos = pwd.find("/./")) != string::npos) - { - pwd.erase(pos, 2); - } - if(chdir(pwd.c_str()) == -1) { // @@ -210,21 +305,7 @@ IcePack::ActivatorI::activate(const ServerPrx& server, const ::Ice::Current&) close(fds[1]); exit(EXIT_FAILURE); } - } - - // - // Compute arguments. - // - int argc = desc.args.size() + 2; - char** argv = static_cast<char**>(malloc(argc * sizeof(char*))); - argv[0] = strdup(path.c_str()); - unsigned int i = 0; - vector<string>::const_iterator q; - for(q = desc.args.begin(); q != desc.args.end(); ++q, ++i) - { - argv[i + 1] = strdup(q->c_str()); - } - argv[argc - 1] = 0; + } if(execvp(argv[0], argv) == -1) { @@ -256,12 +337,66 @@ IcePack::ActivatorI::activate(const ServerPrx& server, const ::Ice::Current&) fcntl(process.fd, F_SETFL, flags); setInterrupt(); + + if(_traceLevels->activator > 0) + { + Ice::Trace out(_traceLevels->logger, _traceLevels->activatorCat); + out << "activated server `" << desc.name << "'(pid = " << pid << ")"; + } } return pid; } void +IcePack::ActivatorI::deactivate(const ServerPrx& server) +{ + pid_t pid = static_cast<pid_t>(server->getPid()); + + // + // Send a SIGTERM to the process. + // + if(::kill(pid, SIGTERM)) + { + SystemException ex(__FILE__, __LINE__); + ex.error = getSystemErrno(); + throw ex; + } + + if(_traceLevels->activator > 1) + { + ServerDescription desc = server->getServerDescription(); + + Ice::Trace out(_traceLevels->logger, _traceLevels->activatorCat); + out << "sent SIGTERM to server `" << desc.name << "' (pid = " << pid << ")"; + } +} + +void +IcePack::ActivatorI::kill(const ServerPrx& server) +{ + pid_t pid = static_cast<pid_t>(server->getPid()); + + // + // Send a SIGKILL to the process. + // + if(::kill(pid, SIGKILL)) + { + SystemException ex(__FILE__, __LINE__); + ex.error = getSystemErrno(); + throw ex; + } + + if(_traceLevels->activator > 1) + { + ServerDescription desc = server->getServerDescription(); + + Ice::Trace out(_traceLevels->logger, _traceLevels->activatorCat); + out << "sent SIGKILL to server `" << desc.name << "' (pid = " << pid << ")"; + } +} + +void IcePack::ActivatorI::terminationListener() { while(true) @@ -278,7 +413,7 @@ IcePack::ActivatorI::terminationListener() { return; } - + for(vector<Process>::iterator p = _processes.begin(); p != _processes.end(); ++p) { int fd = p->fd; @@ -358,20 +493,19 @@ IcePack::ActivatorI::terminationListener() // p = _processes.erase(p); close(fd); + + if(_traceLevels->activator > 0) + { + ServerDescription desc = server->getServerDescription(); + + Ice::Trace out(_traceLevels->logger, _traceLevels->activatorCat); + out << "detected server `" << desc.name << "' termination"; + } // // Notify the server it has terminated. // - try - { - server->terminationCallback(); - } - catch(const Ice::ObjectAdapterDeactivatedException&) - { - // - // Expected when IcePack is shutdown. - // - } + server->terminationCallback(); } // diff --git a/cpp/src/IcePack/ActivatorI.h b/cpp/src/IcePack/ActivatorI.h index b779cbe4d22..084e526cbcd 100644 --- a/cpp/src/IcePack/ActivatorI.h +++ b/cpp/src/IcePack/ActivatorI.h @@ -18,17 +18,22 @@ namespace IcePack { +class TraceLevels; +typedef IceUtil::Handle<TraceLevels> TraceLevelsPtr; + class ActivatorI : public Activator, public IceUtil::Thread, public IceUtil::Mutex { public: - ActivatorI(const Ice::CommunicatorPtr&); + ActivatorI(const Ice::CommunicatorPtr&, const TraceLevelsPtr&); virtual ~ActivatorI(); virtual void run(); - void destroy(); - virtual Ice::Int activate(const ::IcePack::ServerPrx&, const ::Ice::Current&); + virtual Ice::Int activate(const ::IcePack::ServerPrx&); + virtual void deactivate(const ::IcePack::ServerPrx&); + virtual void kill(const ::IcePack::ServerPrx&); + virtual void destroy(); private: @@ -44,8 +49,11 @@ private: }; Ice::CommunicatorPtr _communicator; + TraceLevelsPtr _traceLevels; std::vector<Process> _processes; bool _destroy; + bool _deactivating; + int _fdIntrRead; int _fdIntrWrite; }; diff --git a/cpp/src/IcePack/AdapterManagerI.cpp b/cpp/src/IcePack/AdapterManagerI.cpp index 13c0bf73e26..2fb9890d81c 100644 --- a/cpp/src/IcePack/AdapterManagerI.cpp +++ b/cpp/src/IcePack/AdapterManagerI.cpp @@ -13,6 +13,7 @@ #include <Freeze/Evictor.h> #include <IcePack/AdapterManagerI.h> #include <IcePack/ServerManager.h> +#include <IcePack/TraceLevels.h> using namespace std; using namespace Ice; @@ -48,7 +49,9 @@ class AdapterFactory : public ObjectFactory { public: - AdapterFactory(int waitTime) : _waitTime(waitTime) + AdapterFactory(const TraceLevelsPtr& traceLevels, int waitTime) : + _traceLevels(traceLevels), + _waitTime(waitTime) { } @@ -59,7 +62,7 @@ public: create(const std::string& type) { assert(type == "::IcePack::Adapter"); - return new AdapterI(_waitTime); + return new AdapterI(_traceLevels, _waitTime); } virtual void @@ -69,12 +72,14 @@ public: private: + TraceLevelsPtr _traceLevels; int _waitTime; }; } -IcePack::AdapterI::AdapterI(Int waitTime) : +IcePack::AdapterI::AdapterI(const TraceLevelsPtr& traceLevels, Int waitTime) : + _traceLevels(traceLevels), _waitTime(waitTime), _active(false) { @@ -104,20 +109,39 @@ IcePack::AdapterI::getDirectProxy(bool activate, const Current&) // If there's a server associated to this adapter, try to start // the server and wait for the adapter state to change. // - if(description.server && description.server->start()) + if(description.server) { - // - // Wait for this adapter to be marked as active or the - // activation timeout. - // - while(!_active) + if(_traceLevels->adapterMgr > 2) + { + Ice::Trace out(_traceLevels->logger, _traceLevels->adapterMgrCat); + out << "waiting for activation of adapter `" << description.name << "'"; + } + + if(description.server->start()) { - bool notify = timedWait(IceUtil::Time::seconds(_waitTime)); - if(!notify) + // + // Wait for this adapter to be marked as active or the + // activation timeout. + // + while(!_active) { - throw AdapterActivationTimeoutException(); + bool notify = timedWait(IceUtil::Time::seconds(_waitTime)); + if(!notify) + { + if(_traceLevels->adapterMgr > 1) + { + Ice::Trace out(_traceLevels->logger, _traceLevels->adapterMgrCat); + out << "adapter `" << description.name << "' activation timed out"; + } + throw AdapterActivationTimeoutException(); + } } } + else if(_traceLevels->adapterMgr > 1) + { + Ice::Trace out(_traceLevels->logger, _traceLevels->adapterMgrCat); + out << "adapter `" << description.name << "' activation failed, couldn't start the server"; + } } return proxy; @@ -135,6 +159,13 @@ IcePack::AdapterI::markAsActive(const Current&) { ::IceUtil::Monitor< ::IceUtil::Mutex>::Lock sync(*this); _active = true; + + if(_traceLevels->adapterMgr > 1) + { + Ice::Trace out(_traceLevels->logger, _traceLevels->adapterMgrCat); + out << "adapter `" << description.name << "' activated"; + } + notifyAll(); } @@ -143,21 +174,30 @@ IcePack::AdapterI::markAsInactive(const Current&) { ::IceUtil::Monitor< ::IceUtil::Mutex>::Lock sync(*this); _active = false; + + if(_traceLevels->adapterMgr > 1) + { + Ice::Trace out(_traceLevels->logger, _traceLevels->adapterMgrCat); + out << "adapter `" << description.name << "' deactivated"; + } + notifyAll(); } -IcePack::AdapterManagerI::AdapterManagerI(const ObjectAdapterPtr& adapter, const Freeze::DBEnvironmentPtr& dbEnv) : - _adapter(adapter) +IcePack::AdapterManagerI::AdapterManagerI(const ObjectAdapterPtr& adapter, const TraceLevelsPtr& traceLevels, + const Freeze::DBEnvironmentPtr& dbEnv) : + _adapter(adapter), + _traceLevels(traceLevels) { Ice::PropertiesPtr properties = adapter->getCommunicator()->getProperties(); _waitTime = properties->getPropertyAsIntWithDefault("IcePack.Activation.WaitTime", 60); - ObjectFactoryPtr adapterFactory = new AdapterFactory(_waitTime); + ObjectFactoryPtr adapterFactory = new AdapterFactory(_traceLevels, _waitTime); adapter->getCommunicator()->addObjectFactory(adapterFactory, "::IcePack::Adapter"); Freeze::DBPtr dbAdapters = dbEnv->openDB("adapters", true); _evictor = dbAdapters->createEvictor(Freeze::SaveUponEviction); - _evictor->setSize(100); + _evictor->setSize(1000); _adapter->addServantLocator(_evictor, "adapter"); // @@ -174,6 +214,10 @@ IcePack::AdapterManagerI::AdapterManagerI(const ObjectAdapterPtr& adapter, const } } +IcePack::AdapterManagerI::~AdapterManagerI() +{ +} + AdapterPrx IcePack::AdapterManagerI::create(const AdapterDescription& description, const Current&) { @@ -193,7 +237,7 @@ IcePack::AdapterManagerI::create(const AdapterDescription& description, const Cu { } - AdapterPtr adapterI = new AdapterI(_waitTime); + AdapterPtr adapterI = new AdapterI(_traceLevels, _waitTime); adapterI->description = description; adapterI->proxy = 0; @@ -204,6 +248,12 @@ IcePack::AdapterManagerI::create(const AdapterDescription& description, const Cu _evictor->createObject(adapter->ice_getIdentity(), adapterI); + if(_traceLevels->adapterMgr > 0) + { + Ice::Trace out(_traceLevels->logger, _traceLevels->adapterMgrCat); + out << "added adapter `" << description.name << "'"; + } + return adapter; } @@ -243,6 +293,12 @@ IcePack::AdapterManagerI::remove(const string& name, const Current&) // Remove the adapter name from our internal name set. // _adapterNames.erase(_adapterNames.find(name)); + + if(_traceLevels->adapterMgr > 0) + { + Ice::Trace out(_traceLevels->logger, _traceLevels->adapterMgrCat); + out << "removed adapter `" << name << "'"; + } } AdapterNames diff --git a/cpp/src/IcePack/AdapterManagerI.h b/cpp/src/IcePack/AdapterManagerI.h index 61a5ee81e2d..088276e0c46 100644 --- a/cpp/src/IcePack/AdapterManagerI.h +++ b/cpp/src/IcePack/AdapterManagerI.h @@ -20,11 +20,14 @@ namespace IcePack { +class TraceLevels; +typedef IceUtil::Handle<TraceLevels> TraceLevelsPtr; + class AdapterI : public Adapter, public IceUtil::Monitor< ::IceUtil::Mutex> { public: - AdapterI(::Ice::Int); + AdapterI(const TraceLevelsPtr&, ::Ice::Int); virtual ~AdapterI(); virtual AdapterDescription getAdapterDescription(const ::Ice::Current&); @@ -35,6 +38,7 @@ public: private: + TraceLevelsPtr _traceLevels; ::Ice::Int _waitTime; bool _active; }; @@ -43,7 +47,8 @@ class AdapterManagerI : public AdapterManager, public IceUtil::Mutex { public: - AdapterManagerI(const Ice::ObjectAdapterPtr&, const Freeze::DBEnvironmentPtr&); + AdapterManagerI(const Ice::ObjectAdapterPtr&, const TraceLevelsPtr&, const Freeze::DBEnvironmentPtr&); + virtual ~AdapterManagerI(); virtual AdapterPrx create(const AdapterDescription&, const ::Ice::Current&); virtual AdapterPrx findByName(const ::std::string&, const ::Ice::Current&); @@ -53,6 +58,7 @@ public: private: ::Ice::ObjectAdapterPtr _adapter; + TraceLevelsPtr _traceLevels; ::Freeze::EvictorPtr _evictor; ::std::set< ::std::string> _adapterNames; ::Ice::Int _waitTime; diff --git a/cpp/src/IcePack/AdminI.cpp b/cpp/src/IcePack/AdminI.cpp index dd849abe1d9..f97a727bcc8 100644 --- a/cpp/src/IcePack/AdminI.cpp +++ b/cpp/src/IcePack/AdminI.cpp @@ -19,26 +19,38 @@ using namespace std; using namespace Ice; using namespace IcePack; -IcePack::AdminI::AdminI(const CommunicatorPtr& communicator, const ServerManagerPrx& serverManager, - const AdapterManagerPrx& adapterManager) : - _communicator(communicator), +IcePack::AdminI::AdminI(const CommunicatorPtr& shutdownCommunicator, const CommunicatorPtr& backendCommunicator, + const ServerManagerPrx& serverManager, const AdapterManagerPrx& adapterManager) : + _shutdownCommunicator(shutdownCommunicator), + _backendCommunicator(backendCommunicator), _serverManager(serverManager), _adapterManager(adapterManager) { } +IcePack::AdminI::~AdminI() +{ +} + void IcePack::AdminI::addApplication(const string& descriptor, const Targets& targets, const Current&) { - ApplicationDeployer deployer(_communicator, this, targets); - deployer.parse(descriptor); - deployer.deploy(); + try + { + ApplicationDeployer deployer(_backendCommunicator, this, targets); + deployer.parse(descriptor); + deployer.deploy(); + } + catch(const LocalException& ex) + { + cout << ex << endl; + } } void IcePack::AdminI::removeApplication(const string& descriptor, const Current&) { - ApplicationDeployer deployer(_communicator, this, Targets()); + ApplicationDeployer deployer(_backendCommunicator, this, Targets()); deployer.parse(descriptor); deployer.undeploy(); } @@ -47,7 +59,7 @@ void IcePack::AdminI::addServer(const string& name, const string& path, const string& ldpath, const string& descriptor, const Targets& targets, const Current&) { - ServerDeployer deployer(_communicator, name, path, ldpath, targets); + ServerDeployer deployer(_backendCommunicator, name, path, ldpath, targets); deployer.setServerManager(_serverManager); deployer.setAdapterManager(_adapterManager); deployer.parse(descriptor); @@ -126,18 +138,24 @@ void IcePack::AdminI::removeServer(const string& name, const Current&) { ServerPrx server = _serverManager->findByName(name); - if(!server) + if(server) { - throw ServerNotExistException(); + try + { + ServerDescription desc = server->getServerDescription(); + + ServerDeployer deployer(_backendCommunicator, desc.name, desc.path, "", desc.targets); + deployer.setServerManager(_serverManager); + deployer.setAdapterManager(_adapterManager); + deployer.parse(desc.descriptor); + deployer.undeploy(); + return; + } + catch(const ObjectNotExistException&) + { + } } - - ServerDescription desc = server->getServerDescription(); - - ServerDeployer deployer(_communicator, desc.name, desc.path, "", desc.targets); - deployer.setServerManager(_serverManager); - deployer.setAdapterManager(_adapterManager); - deployer.parse(desc.descriptor); - deployer.undeploy(); + throw ServerNotExistException(); } ServerNames @@ -160,7 +178,7 @@ IcePack::AdminI::addAdapterWithEndpoints(const string& name, const string& endpo // // Set the adapter direct proxy. // - ObjectPrx object = _communicator->stringToProxy("dummy:" + endpoints); + ObjectPrx object = _backendCommunicator->stringToProxy("dummy:" + endpoints); adapter->setDirectProxy(object); } @@ -178,7 +196,7 @@ IcePack::AdminI::getAdapterEndpoints(const string& name, const Current&) const { try { - return _communicator->proxyToString(adapter->getDirectProxy(false)); + return _backendCommunicator->proxyToString(adapter->getDirectProxy(false)); } catch(const ObjectNotExistException&) { @@ -196,5 +214,5 @@ IcePack::AdminI::getAllAdapterNames(const Current&) const void IcePack::AdminI::shutdown(const Current&) { - _communicator->shutdown(); + _shutdownCommunicator->shutdown(); } diff --git a/cpp/src/IcePack/AdminI.h b/cpp/src/IcePack/AdminI.h index 0e0f94d17d3..5c431c10b9d 100644 --- a/cpp/src/IcePack/AdminI.h +++ b/cpp/src/IcePack/AdminI.h @@ -22,7 +22,9 @@ class AdminI : public Admin, public IceUtil::Mutex { public: - AdminI(const Ice::CommunicatorPtr&, const ServerManagerPrx&, const AdapterManagerPrx&); + AdminI(const Ice::CommunicatorPtr&, const Ice::CommunicatorPtr&, const ServerManagerPrx&, + const AdapterManagerPrx&); + virtual ~AdminI(); virtual void addApplication(const std::string&, const Targets&, const Ice::Current& = Ice::Current()); virtual void removeApplication(const std::string&, const Ice::Current& = Ice::Current()); @@ -45,7 +47,8 @@ public: private: - Ice::CommunicatorPtr _communicator; + Ice::CommunicatorPtr _shutdownCommunicator; + Ice::CommunicatorPtr _backendCommunicator; ServerManagerPrx _serverManager; AdapterManagerPrx _adapterManager; }; diff --git a/cpp/src/IcePack/ApplicationDeployer.cpp b/cpp/src/IcePack/ApplicationDeployer.cpp index 28384fec7ca..19cbcf3e8c5 100644 --- a/cpp/src/IcePack/ApplicationDeployer.cpp +++ b/cpp/src/IcePack/ApplicationDeployer.cpp @@ -142,8 +142,7 @@ IcePack::ApplicationDeployer::addServer(const string& name, throw DeploySAXParseException("descriptor attribute value is empty", _locator); } - string xmlFile = descriptor[0] != '/' ? _variables["basedir"] + "/" + descriptor : descriptor; - - _tasks.push_back(new AddServer(_admin, name, xmlFile, binpath, libpath, _targets)); + _tasks.push_back(new AddServer(_admin, name, toLocation(descriptor), toLocation(binpath), toLocation(libpath), + _targets)); } diff --git a/cpp/src/IcePack/Client.cpp b/cpp/src/IcePack/Client.cpp index 0b70eb9a98c..a3c1d5960b1 100644 --- a/cpp/src/IcePack/Client.cpp +++ b/cpp/src/IcePack/Client.cpp @@ -175,12 +175,10 @@ Client::run(int argc, char* argv[]) return EXIT_FAILURE; } - Ice::ObjectPrx base = communicator()->stringToProxy("IcePack/admin@IcePack.Admin"); - - AdminPrx admin = AdminPrx::checkedCast(base); + AdminPrx admin = AdminPrx::checkedCast(communicator()->stringToProxy("IcePack/Admin@IcePackAdminAdapter")); if(!admin) { - cerr << appName() << ": `" << "' are no valid administrative endpoints" << endl; + cerr << appName() << ": no valid administrative endpoints" << endl; return EXIT_FAILURE; } diff --git a/cpp/src/IcePack/ComponentDeployer.cpp b/cpp/src/IcePack/ComponentDeployer.cpp index 0a56a6d2e79..5461728cea2 100644 --- a/cpp/src/IcePack/ComponentDeployer.cpp +++ b/cpp/src/IcePack/ComponentDeployer.cpp @@ -488,20 +488,8 @@ IcePack::ComponentDeployer::ComponentDeployer(const Ice::CommunicatorPtr& commun assert(!serversPath.empty()); _variables["datadir"] = serversPath + (serversPath[serversPath.length() - 1] == '/' ? "" : "/") + "servers"; - // - // TODO: Find a better way to bootstrap the yellow service. We - // need to set the locator on the proxy here, because the - // communicator doesn't have a default locator since it's the - // locator communicator... - // - Ice::ObjectPrx object = - _communicator->stringToProxy(_communicator->getProperties()->getProperty("IcePack.Yellow.Admin")); - if(object) - { - Ice::LocatorPrx locator = Ice::LocatorPrx::uncheckedCast( - _communicator->stringToProxy(_communicator->getProperties()->getProperty("Ice.Default.Locator"))); - _yellowAdmin = Yellow::AdminPrx::uncheckedCast(object->ice_locator(locator)); - } + _yellowAdmin = Yellow::AdminPrx::uncheckedCast( + _communicator->stringToProxy(_communicator->getProperties()->getProperty("IcePack.Yellow.Admin"))); } void @@ -738,6 +726,23 @@ IcePack::ComponentDeployer::overrideBaseDir(const string& basedir) } // +// Returns a path including the base directory if path is a relative +// path. +// +string +IcePack::ComponentDeployer::toLocation(const string& path) const +{ + if(path.empty()) + { + return ""; + } + + map<string, string>::const_iterator p = _variables.find("basedir"); + assert(p != _variables.end()); + return path[0] != '/' ? p->second + "/" + path : path; +} + +// // Substitute variables with their values. // string diff --git a/cpp/src/IcePack/ComponentDeployer.h b/cpp/src/IcePack/ComponentDeployer.h index aed0a920dcb..17bfb9778f8 100644 --- a/cpp/src/IcePack/ComponentDeployer.h +++ b/cpp/src/IcePack/ComponentDeployer.h @@ -120,7 +120,6 @@ public: void parse(const std::string&, ComponentDeployHandler&); void setDocumentLocator(const Locator*const locator); - std::string substitute(const std::string&) const; bool isTargetDeployable(const std::string&) const; @@ -130,9 +129,12 @@ public: void addOffer(const std::string&, const std::string&, const std::string&); void overrideBaseDir(const std::string&); + std::string toLocation(const std::string&) const; + std::string substitute(const std::string&) const; + void undeployFrom(std::vector<TaskPtr>::iterator); + protected: - void undeployFrom(std::vector<TaskPtr>::iterator); Ice::CommunicatorPtr _communicator; Yellow::AdminPrx _yellowAdmin; diff --git a/cpp/src/IcePack/Makefile b/cpp/src/IcePack/Makefile index 4833dcd761c..8d36864f3f8 100644 --- a/cpp/src/IcePack/Makefile +++ b/cpp/src/IcePack/Makefile @@ -41,7 +41,8 @@ SOBJS = Server.o \ LocatorI.o \ LocatorRegistryI.o \ AdminI.o \ - ActivatorI.o + ActivatorI.o \ + TraceLevels.o SRCS = $(OBJS:.o=.cpp) \ $(COBJS:.o=.cpp) \ @@ -71,7 +72,7 @@ $(CLIENT): $(COBJS) $(SERVER): $(SOBJS) rm -f $@ - $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(SOBJS) -lYellow -lIcePack -lFreeze $(XERCESC_LIBS) $(LIBS) -ldb + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(SOBJS) -lYellow -lIcePack -lIceBox -lFreeze $(XERCESC_LIBS) $(LIBS) -ldb Grammar.cpp Grammar.h: Grammar.y bison -dvt Grammar.y diff --git a/cpp/src/IcePack/Server.cpp b/cpp/src/IcePack/Server.cpp index 71b47459ccb..37643b62116 100644 --- a/cpp/src/IcePack/Server.cpp +++ b/cpp/src/IcePack/Server.cpp @@ -8,12 +8,14 @@ // // ********************************************************************** -#include <Freeze/Application.h> +#include <Ice/Application.h> +#include <Freeze/Freeze.h> #include <IcePack/LocatorI.h> #include <IcePack/LocatorRegistryI.h> #include <IcePack/ServerManagerI.h> #include <IcePack/AdapterManagerI.h> #include <IcePack/AdminI.h> +#include <IcePack/TraceLevels.h> #ifndef _WIN32 # include <IcePack/ActivatorI.h> # include <signal.h> @@ -30,17 +32,31 @@ using namespace Ice; using namespace Freeze; using namespace IcePack; -class Server : public Freeze::Application +class Server : public Ice::Application { public: - Server(const string& dbEnvName) : - Freeze::Application(dbEnvName) + Server() { } void usage(); - virtual int runFreeze(int argc, char* argv[], const DBEnvironmentPtr&); + virtual int run(int argc, char* argv[]); + +private: + + void initInternal(const CommunicatorPtr&); + void initLocator(const CommunicatorPtr&); + void initLocatorRegistry(const CommunicatorPtr&); + void initAdmin(const CommunicatorPtr&, const CommunicatorPtr&); + + AdapterManagerPrx _adapterManager; + ServerManagerPrx _serverManager; + ActivatorPtr _activator; + AdminPrx _admin; + LocatorPrx _locator; + LocatorRegistryPrx _locatorRegistry; + DBEnvironmentPtr _dbEnv; }; #ifndef _WIN32 @@ -77,60 +93,7 @@ main(int argc, char* argv[]) return EXIT_FAILURE; } - // TODO: ML: Loose this try/catch, it's unnecessary. The - // Application::main() catches already. - PropertiesPtr defaultProperties; - try - { - defaultProperties = getDefaultProperties(argc, argv); - StringSeq args = argsToStringSeq(argc, argv); - args = defaultProperties->parseCommandLineOptions("IcePack", args); - stringSeqToArgs(args, argc, argv); - } - catch(const SystemException& ex) - { - cerr << argv[0] << ": " << ex << endl; - return EXIT_FAILURE; - } - - // - // Check that IcePack.Data property is set and creates - // subdirectories db and servers if they don't already exist. - // - string dataPath = defaultProperties->getProperty("IcePack.Data"); - if(dataPath.empty()) - { - cerr << argv[0] << ": property `IcePack.Data' is not set" << endl; - return EXIT_FAILURE; - } - if(dataPath[dataPath.length() - 1] != '/') - { - dataPath += "/"; - } - - string dbPath = dataPath + "db"; - string serversPath = dataPath + "servers"; - - struct stat filestat; - if(stat(dataPath.c_str(), &filestat) == 0 && S_ISDIR(filestat.st_mode)) - { - if(stat(dbPath.c_str(), &filestat) != 0) - { - mkdir(dbPath.c_str(), 0755); - } - - if(stat(serversPath.c_str(), &filestat) != 0) - { - mkdir(serversPath.c_str(), 0755); - } - } - else - { - cerr << argv[0] << ": `IcePack.Data' doesn't contain a valid directory path." << endl; - return EXIT_FAILURE; - } - - ::Server app(dbPath); + ::Server app; int rc = app.main(argc, argv); XMLPlatformUtils::Terminate(); @@ -154,10 +117,12 @@ void } int -::Server::runFreeze(int argc, char* argv[], const DBEnvironmentPtr& dbEnv) +::Server::run(int argc, char* argv[]) { PropertiesPtr properties = communicator()->getProperties(); + communicator()->setDefaultLocator(0); + StringSeq args = argsToStringSeq(argc, argv); args = properties->parseCommandLineOptions("IcePack", args); args = properties->parseCommandLineOptions("Freeze", args); @@ -206,22 +171,40 @@ int } } - string locatorEndpoints = properties->getProperty("IcePack.Locator.Endpoints"); - if(locatorEndpoints.empty()) + // + // Check that required properties are set and valid. + // + if(properties->getProperty("IcePack.Locator.Endpoints").empty()) { cerr << appName() << ": property `IcePack.Locator.Endpoints' is not set" << endl; return EXIT_FAILURE; } - - string locatorRegistryEndpoints = properties->getProperty("IcePack.LocatorRegistry.Endpoints"); - if(locatorRegistryEndpoints.empty()) + if(properties->getProperty("IcePack.LocatorRegistry.Endpoints").empty()) { cerr << appName() << ": property `IcePack.LocatorRegistry.Endpoints' is not set" << endl; return EXIT_FAILURE; } - - string adminEndpoints = properties->getProperty("IcePack.Admin.Endpoints"); - if(!adminEndpoints.empty()) + if(properties->getProperty("IcePack.Data").empty()) + { + cerr << argv[0] << ": property `IcePack.Data' is not set" << endl; + return EXIT_FAILURE; + } + else + { + struct stat filestat; + if(stat(properties->getProperty("IcePack.Data").c_str(), &filestat) != 0) + { + cerr << argv[0] << ": failed to check if property `IcePack.Data' is set to a directory path: " + << strerror(getSystemErrno()) << endl; + return EXIT_FAILURE; + } + if(!S_ISDIR(filestat.st_mode)) + { + cerr << argv[0] << ": property `IcePack.Data' is not set to a directory path" << endl; + return EXIT_FAILURE; + } + } + if(!properties->getProperty("IcePack.Admin.Endpoints").empty()) { if(!nowarn) { @@ -229,137 +212,262 @@ int } } - string locatorId = properties->getPropertyWithDefault("IcePack.Locator.Identity", "IcePack/locator"); - string locatorRegistryId = properties->getPropertyWithDefault("IcePack.LocatorRegistry.Identity", - "IcePack/locatorregistry"); - string adminId = properties->getPropertyWithDefault("IcePack.Admin.Identity", "IcePack/admin"); - - communicator()->getProperties()->setProperty("Ice.Default.Locator", locatorId + ":" + locatorEndpoints); - // - // An internal object adapter for internal objects which are not - // exposed to the outside world. They might be at one point. + // We need another communicator for two reasons: // - ObjectAdapterPtr internalAdapter = communicator()->createObjectAdapterWithEndpoints("IcePack.Internal", ""); - internalAdapter->setLocator(0); - + // We need a separate thread pool to dispatch the locator registry + // incoming calls to avoid deadlocks (where a client makes a + // request on the locator which in turn causes the activation of a + // server which invoke on the locator registry interface). // - // Creates and register the adapter manager. + // We need to make collocated calls on the internal objects after + // shutdown. // - AdapterManagerPtr adapterManager = new AdapterManagerI(internalAdapter, dbEnv); - AdapterManagerPrx adapterManagerProxy = - AdapterManagerPrx::uncheckedCast(internalAdapter->add(adapterManager, - stringToIdentity("IcePack/adaptermanager"))); + int dummyArgc = 0; + char **dummyArgv = 0; + Ice::CommunicatorPtr backendCommunicator = Ice::initialize(dummyArgc, dummyArgv, communicator()->getProperties()); + + int status = EXIT_SUCCESS; + + try + { + // + // Initialize internal objects and external interfaces. + // + initInternal(backendCommunicator); + initLocatorRegistry(backendCommunicator); + initLocator(communicator()); + initAdmin(communicator(), backendCommunicator); + + + // + // Deploy application descriptor if a descriptor is passed as + // a command line option. + // + if(!descriptor.empty()) + { + try + { + _admin->addApplication(descriptor, targets); + } + catch(const ServerDeploymentException& ex) + { + cerr << appName() << ": warning: failed to deploy application " << descriptor << ":" << endl; + cerr << ex << ": " << ex.server << ": " << ex.reason << endl; + } + catch(const DeploymentException& ex) + { + cerr << appName() << ": warning: failed to deploy application " << descriptor << ":" << endl; + cerr << ex << ": " << ex.component << ": " << ex.reason << endl; + } + } + + string bundleName = properties->getProperty("IcePack.PrintServersReady"); + if(!bundleName.empty()) + { + cout << bundleName << " ready" << endl; + } + + shutdownOnInterrupt(); + communicator()->waitForShutdown(); + ignoreInterrupt(); + } + catch(const DBException& ex) + { + cerr << appName() << ": " << ex << ": " << ex.message << endl; + status = EXIT_FAILURE; + } + catch(const Exception& ex) + { + cerr << appName() << ": " << ex << endl; + status = EXIT_FAILURE; + } + catch(...) + { + cerr << appName() << ": unknown exception" << endl; + status = EXIT_FAILURE; + } + + try + { + // + // Destroy and join with activator, must be done before shutting + // down the backend communicator since invocation on collocated + // objects are done while deactivating the servers. + // + if(_activator) + { + _activator->destroy(); + _activator = 0; + } + + _adapterManager = 0; + _serverManager = 0; + _admin = 0; + _locator = 0; + _locatorRegistry = 0; + + // + // Shutdown the backend communicator. This cause the internal + // adapter to evict all its objects and save their state to + // the database. This needs to be done before destroying the + // database environment. + // + backendCommunicator->shutdown(); + backendCommunicator->waitForShutdown(); + + if(_dbEnv) + { + _dbEnv->close(); + _dbEnv = 0; + } + + backendCommunicator->destroy(); + backendCommunicator = 0; + } + catch(const DBException& ex) + { + cerr << appName() << ": " << ex << ": " << ex.message << endl; + status = EXIT_FAILURE; + } + + return status; +} + +// +// Initialize internal objects: the adapter manager, the server +// manager and the activator. +// +void +::Server::initInternal(const CommunicatorPtr& communicator) +{ + PropertiesPtr properties = communicator->getProperties(); + + TraceLevelsPtr traceLevels = new TraceLevels(properties, communicator->getLogger()); // - // Activator and server manager are not supported on Windows yet. + // Creates subdirectories db and servers if they don't already + // exist. // - ServerManagerPrx serverManagerProxy; + string dataPath = properties->getProperty("IcePack.Data"); + if(dataPath[dataPath.length() - 1] != '/') + { + dataPath += "/"; + } -#ifndef _WIN32 + string dbPath = dataPath + "db"; + string serversPath = dataPath + "servers"; + + struct stat filestat; + if(stat(dbPath.c_str(), &filestat) != 0) + { + mkdir(dbPath.c_str(), 0755); + } + + if(stat(serversPath.c_str(), &filestat) != 0) + { + mkdir(serversPath.c_str(), 0755); + } + + _dbEnv = Freeze::initialize(communicator, dbPath); + + ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("IcePackInternalAdapter", ""); + adapter->setLocator(0); - ActivatorIPtr activator = new ActivatorI(communicator()); + Ice::ObjectPrx object; + + ActivatorIPtr activator = new ActivatorI(communicator, traceLevels); activator->start(); - ActivatorPrx activatorProxy = ActivatorPrx::uncheckedCast(internalAdapter->add(activator, - stringToIdentity("IcePack/activator"))); + _activator = activator; - ServerManagerPtr serverManager = new ServerManagerI(internalAdapter, dbEnv, adapterManagerProxy, activatorProxy); - serverManagerProxy = - ServerManagerPrx::uncheckedCast(internalAdapter->add(serverManager, - stringToIdentity("IcePack/servermanager"))); - internalAdapter->activate(); + AdapterManagerPtr adapterManager = new AdapterManagerI(adapter, traceLevels, _dbEnv); + object = adapter->add(adapterManager, stringToIdentity("IcePack/AdapterManager")); + _adapterManager = AdapterManagerPrx::uncheckedCast(object); -#endif + ServerManagerPtr serverManager = new ServerManagerI(adapter, traceLevels, _dbEnv, _adapterManager, _activator); + object = adapter->add(serverManager, stringToIdentity("IcePack/ServerManager")); + _serverManager = ServerManagerPrx::uncheckedCast(object); - // - // Create the "IcePack.Admin" object adapter and register the - // admin object. The admin object is used by icepackadmin to - // administrate IcePack. - // - ObjectAdapterPtr adminAdapter = communicator()->createObjectAdapterWithEndpoints("IcePack.Admin", adminEndpoints); - AdminPtr admin = new AdminI(communicator(), serverManagerProxy, adapterManagerProxy); - adminAdapter->add(admin, stringToIdentity(adminId)); + adapter->activate(); +} - // - // Create the "IcePack.LocatorRegistry" object adapter and - // registry the locator registry object. - // - // The locator registry object provides an implementation of the - // Ice::LocatorRegistry interface. This interface is used by Ice - // servers to register their object adapters. - // - ObjectAdapterPtr locatorRegistryAdapter = - communicator()->createObjectAdapterWithEndpoints("IcePack.LocatorRegistry", locatorRegistryEndpoints); - locatorRegistryAdapter->setLocator(0); - LocatorRegistryPtr locatorRegistry = new LocatorRegistryI(adapterManagerProxy); - LocatorRegistryPrx locatorRegistryProxy = - LocatorRegistryPrx::uncheckedCast(locatorRegistryAdapter->add(locatorRegistry, - stringToIdentity(locatorRegistryId))); +void +::Server::initLocator(const CommunicatorPtr& communicator) +{ + assert(_adapterManager && _locatorRegistry); + + PropertiesPtr properties = communicator->getProperties(); + + string endpoints = properties->getProperty("IcePack.Locator.Endpoints"); + string id = properties->getPropertyWithDefault("IcePack.Locator.Identity", "IcePack/Locator"); // // Create the "IcePack.Locator" object adapter and register the // locator object. // - // The locator locator object provides an implementation of the + // The locator object provides an implementation of the // Ice::Locator interface. This interface is used by Ice clients // to locate object adapters and their associated endpoints. // - LocatorPtr locator = new LocatorI(adapterManagerProxy, locatorRegistryProxy); - ObjectAdapterPtr locatorAdapter = communicator()->createObjectAdapterWithEndpoints("IcePack.Locator", - locatorEndpoints); - locatorAdapter->setLocator(0); - LocatorPrx locatorProxy = LocatorPrx::uncheckedCast(locatorAdapter->add(locator, stringToIdentity(locatorId))); + ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("IcePackLocatorAdapter", endpoints); + adapter->setLocator(0); - // - // Set the locator for the admin object adapter. - // - adminAdapter->setLocator(locatorProxy); + LocatorPtr locator = new LocatorI(_adapterManager, _locatorRegistry); + _locator = LocatorPrx::uncheckedCast(adapter->add(locator, stringToIdentity(id))); - // - // Activate adapters. - // - adminAdapter->activate(); - locatorRegistryAdapter->activate(); - locatorAdapter->activate(); + adapter->activate(); +} + +void +::Server::initLocatorRegistry(const CommunicatorPtr& communicator) +{ + assert(_adapterManager); + + PropertiesPtr properties = communicator->getProperties(); + + string endpoints = properties->getProperty("IcePack.LocatorRegistry.Endpoints"); + string id = properties->getPropertyWithDefault("IcePack.LocatorRegistry.Identity", "IcePack/LocatorRegistry"); // - // Deploy application desciptor. + // Create the "IcePack.LocatorRegistry" object adapter and + // register the locator registry object. // - if(!descriptor.empty()) - { - try - { - admin->addApplication(descriptor, targets); - } - catch(const ServerDeploymentException& ex) - { - cerr << appName() << ": warning: failed to deploy application " << descriptor << ":" << endl; - cerr << ex << ": " << ex.server << ": " << ex.reason << endl; - } - catch(const DeploymentException& ex) - { - cerr << appName() << ": warning: failed to deploy application " << descriptor << ":" << endl; - cerr << ex << ": " << ex.component << ": " << ex.reason << endl; - } - } + // The locator registry object provides an implementation of the + // Ice::LocatorRegistry interface. This interface is used by Ice + // servers to register their object adapters. + // + ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("IcePackLocatorRegistryAdapter", + endpoints); + adapter->setLocator(0); + LocatorRegistryPtr locatorRegistry = new LocatorRegistryI(_adapterManager); + _locatorRegistry = LocatorRegistryPrx::uncheckedCast(adapter->add(locatorRegistry, stringToIdentity(id))); - string bundleName = properties->getProperty("IcePack.PrintServersReady"); - if(!bundleName.empty()) - { - cout << bundleName << " ready" << endl; - } + adapter->activate(); +} - shutdownOnInterrupt(); - communicator()->waitForShutdown(); - ignoreInterrupt(); +void +::Server::initAdmin(const CommunicatorPtr& communicator, const CommunicatorPtr& backendCommunicator) +{ + assert(_serverManager && _adapterManager && _locator); + + PropertiesPtr properties = communicator->getProperties(); -#ifndef _WIN32 // - // Destroy and join with activator. + // The deployer get the locator proxy from the communicator + // properties. // - activator->destroy(); - activator->getThreadControl().join(); -#endif + properties->setProperty("Ice.Default.Locator", communicator->proxyToString(_locator)); + + backendCommunicator->setDefaultLocator(_locator); + + string endpoints = properties->getProperty("IcePack.Admin.Endpoints"); + string id = properties->getPropertyWithDefault("IcePack.Admin.Identity", "IcePack/Admin"); + + ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("IcePackAdminAdapter", endpoints); + AdminPtr admin = new AdminI(communicator, backendCommunicator, _serverManager, _adapterManager); + _admin = AdminPrx::uncheckedCast(adapter->add(admin, stringToIdentity(id))); + + _locatorRegistry->addAdapter("IcePackAdminAdapter", adapter->createProxy(stringToIdentity("dummy"))); - return EXIT_SUCCESS; + adapter->activate(); } diff --git a/cpp/src/IcePack/ServerDeployer.cpp b/cpp/src/IcePack/ServerDeployer.cpp index 636ee0ac022..ba2f94f32d5 100644 --- a/cpp/src/IcePack/ServerDeployer.cpp +++ b/cpp/src/IcePack/ServerDeployer.cpp @@ -363,7 +363,7 @@ IcePack::ServerDeployer::addAdapter(const string& name, const string& endpoints) if(_automaticActivation) { desc.server = ServerPrx::uncheckedCast( - _communicator->stringToProxy("server/" + _description.name + "@IcePack.Internal")); + _communicator->stringToProxy("server/" + _description.name + "@IcePackInternalAdapter")); _description.adapters.push_back(desc.name); } @@ -404,8 +404,7 @@ IcePack::ServerDeployer::addService(const string& name, const string& descriptor ServiceDeployer* task = new ServiceDeployer(_communicator, *this, variables, componentPath, _targets); try { - string xmlFile = descriptor[0] != '/' ? _variables["basedir"] + "/" + descriptor : descriptor; - task->parse(xmlFile); + task->parse(toLocation(descriptor)); } catch(const ParserDeploymentException& ex) { @@ -437,12 +436,15 @@ IcePack::ServerDeployer::setKind(ServerDeployer::ServerKind kind) { throw DeploySAXParseException("C++ server path is not specified", _locator); } - + _description.isIceBox = false; + break; + case ServerKindJavaServer: if(_description.path.empty()) { _description.path = "java"; } + _description.isIceBox = false; break; case ServerKindJavaIceBox: @@ -450,6 +452,7 @@ IcePack::ServerDeployer::setKind(ServerDeployer::ServerKind kind) { _description.path = "java"; } + _description.isIceBox = true; _className = "IceBox.Server"; createDirectory("/dbs"); addProperty("IceBox.Name", _variables["name"]); @@ -461,6 +464,7 @@ IcePack::ServerDeployer::setKind(ServerDeployer::ServerKind kind) { _description.path = "icebox"; } + _description.isIceBox = true; createDirectory("/dbs"); addProperty("IceBox.Name", _variables["name"]); addAdapter(_variables["name"] + ".ServiceManagerAdapter",""); diff --git a/cpp/src/IcePack/ServerManager.ice b/cpp/src/IcePack/ServerManager.ice index de78c865d2d..d1f1ac581f5 100644 --- a/cpp/src/IcePack/ServerManager.ice +++ b/cpp/src/IcePack/ServerManager.ice @@ -40,6 +40,15 @@ class Server /** * + * Stop the server. This methods returns only when the server is + * deactivated. If the server doesn't stop after a configurable + * amount of time, it will be killed. + * + **/ + void stop(); + + /** + * * This method is called by the activator when it detects that the * server has terminated. * @@ -55,7 +64,7 @@ class Server /** * - * Set the server pid. + * Get the server pid. * **/ int getPid(); @@ -83,7 +92,8 @@ class ServerManager * **/ Server* create(ServerDescription desc) - throws DeploymentException, ServerExistsException; + throws ServerExistsException; + /** * diff --git a/cpp/src/IcePack/ServerManagerI.cpp b/cpp/src/IcePack/ServerManagerI.cpp index 9889ef68a44..4663853b87b 100644 --- a/cpp/src/IcePack/ServerManagerI.cpp +++ b/cpp/src/IcePack/ServerManagerI.cpp @@ -17,6 +17,8 @@ #include <IcePack/AdapterManager.h> #include <IcePack/Activator.h> #include <IcePack/ServerDeployer.h> +#include <IcePack/TraceLevels.h> +#include <IceBox/IceBox.h> using namespace std; using namespace Ice; @@ -52,8 +54,9 @@ class ServerFactory : public ObjectFactory { public: - ServerFactory(const ObjectAdapterPtr& adapter, const ActivatorPrx& activator) : + ServerFactory(const ObjectAdapterPtr& adapter, const TraceLevelsPtr& traceLevels, const ActivatorPtr& activator) : _adapter(adapter), + _traceLevels(traceLevels), _activator(activator) { } @@ -62,7 +65,7 @@ public: create(const std::string& type) { assert(type == "::IcePack::Server"); - return new ServerI(_adapter, _activator); + return new ServerI(_adapter, _traceLevels, _activator); } virtual void @@ -75,17 +78,21 @@ public: private: ObjectAdapterPtr _adapter; - ActivatorPrx _activator; + TraceLevelsPtr _traceLevels; + ActivatorPtr _activator; }; } -IcePack::ServerI::ServerI(const ObjectAdapterPtr& adapter, const ActivatorPrx& activator) : +IcePack::ServerI::ServerI(const ObjectAdapterPtr& adapter, const TraceLevelsPtr& traceLevels, + const ActivatorPtr& activator) : _adapter(adapter), + _traceLevels(traceLevels), _activator(activator), _state(Inactive), _pid(0) { + assert(_activator); } IcePack::ServerI::~ServerI() @@ -104,11 +111,6 @@ IcePack::ServerI::start(const Current&) while(true) { IceUtil::Monitor< IceUtil::Mutex>::Lock sync(*this); - if(!_activator) - { - return false; - } - switch(_state) { case Inactive: @@ -122,19 +124,22 @@ IcePack::ServerI::start(const Current&) continue; } case Active: - { - return true; // Raise an exception instead? - } case Deactivating: { - wait(); - continue; + return true; // Raise an exception instead? } case Destroyed: { throw ObjectNotExistException(__FILE__,__LINE__); } } + + if(_traceLevels->serverMgr > 2) + { + Ice::Trace out(_traceLevels->logger, _traceLevels->serverMgrCat); + out << "changed server `" << description.name << "' state to `Activating'"; + } + assert(_state == Activating); break; } @@ -157,14 +162,203 @@ IcePack::ServerI::start(const Current&) } void -IcePack::ServerI::terminationCallback(const Current&) +IcePack::ServerI::stop(const Current&) { + while(true) + { + IceUtil::Monitor< IceUtil::Mutex>::Lock sync(*this); + switch(_state) + { + case Inactive: + { + return; + } + case Activating: + { + wait(); // TODO: Timeout? + continue; + } + case Active: + { + _state = Deactivating; + break; + } + case Deactivating: + { + wait(); + continue; + } + case Destroyed: + { + throw ObjectNotExistException(__FILE__,__LINE__); + } + } + + if(_traceLevels->serverMgr > 2) + { + Ice::Trace out(_traceLevels->logger, _traceLevels->serverMgrCat); + out << "changed server `" << description.name << "' state to `Deactivating'"; + } + assert(_state == Deactivating); + break; + } + + Ice::PropertiesPtr properties = _adapter->getCommunicator()->getProperties(); + Int waitTime = properties->getPropertyAsIntWithDefault("IcePack.Activation.WaitTime", 60); + + // + // If the server is an icebox, first try to use the IceBox service + // manager to shutdown the server. + // + bool deactivate = true; + + if(description.isIceBox) + { + try + { + Ice::ObjectPrx object = _adapter->getCommunicator()->stringToProxy( + description.name + ".ServiceManager@" + description.name + ".ServiceManagerAdapter"); + + if(object) + { + IceBox::ServiceManagerPrx serviceManager = + IceBox::ServiceManagerPrx::uncheckedCast(object->ice_timeout(waitTime)); + + if(serviceManager) + { + serviceManager->shutdown(); + + // + // No need to deactivate the process by sending a signal + // since we successfully called shutdown on the service + // manager. + // + deactivate = false; + } + } + } + catch(const Ice::LocalException& ex) + { + if(_traceLevels->serverMgr > 1) + { + Ice::Trace out(_traceLevels->logger, _traceLevels->serverMgrCat); + out << "couldn't contact the IceBox `" << description.name << "' service manager:\n"; + out << ex; + } + } + + } + + if(deactivate) + { + // + // Deactivate the server by sending a SIGTERM. + // + try + { + _activator->deactivate(ServerNameToServer(_adapter)(description.name)); + } + catch (const SystemException& ex) + { + Warning out(_adapter->getCommunicator()->getLogger()); + out << "deactivation failed for server `" << description.name << "':\n"; + out << ex; + + setState(Active); + return; + } + } + + // + // Wait for the server to be inactive (the activator monitors the + // process and should notify us when it detects the process + // termination by calling the terminationCallback() method). // - // Callback from the activator indicating that the server - // stopped. Change state to deactivating while we mark the server - // adapters as inactive. + { + IceUtil::Monitor< IceUtil::Mutex>::Lock sync(*this); + while(true) + { + if(_state == Inactive) + { + // + // State changed to inactive, the server has been + // correctly deactivated, we can return. + // + return; + } + + // + // Wait for a state change. + // + bool notify = timedWait(IceUtil::Time::seconds(waitTime)); + if(!notify) + { + // + // Timeout. + // + assert(_state == Deactivating); + break; + } + } + } + + if(_traceLevels->serverMgr > 1) + { + Ice::Trace out(_traceLevels->logger, _traceLevels->serverMgrCat); + out << "gracefull server shutdown failed, killing server `" << description.name << "'"; + } + // - setState(Deactivating); + // The server is still not inactive, kill it. + // + try + { + _activator->kill(ServerNameToServer(_adapter)(description.name)); + } + catch (const SystemException& ex) + { + Warning out(_adapter->getCommunicator()->getLogger()); + out << "deactivation failed for server `" << description.name << "':\n"; + out << ex; + + setState(Active); + } +} + +void +IcePack::ServerI::terminationCallback(const Current&) +{ + while(true) + { + IceUtil::Monitor< IceUtil::Mutex>::Lock sync(*this); + switch(_state) + { + case Inactive: + case Activating: + case Destroyed: + { + assert(false); + } + case Active: + { + _state = Deactivating; + + if(_traceLevels->serverMgr > 2) + { + Ice::Trace out(_traceLevels->logger, _traceLevels->serverMgrCat); + out << "changed server `" << description.name << "' state to `Deactivating'"; + } + break; + } + case Deactivating: + { + // Deactivation was initiated by stop(). + break; + } + } + assert(_state == Deactivating); + break; + } // // Mark each adapter as inactive. adapters is immutable when @@ -204,6 +398,33 @@ IcePack::ServerI::setState(ServerState state) _state = state; + if(_traceLevels->serverMgr > 1) + { + if(_state == Active) + { + Ice::Trace out(_traceLevels->logger, _traceLevels->serverMgrCat); + out << "changed server `" << description.name << "' state to `Active'"; + } + else if(_state == Inactive) + { + Ice::Trace out(_traceLevels->logger, _traceLevels->serverMgrCat); + out << "changed server `" << description.name << "' state to `Inactive'"; + } + else if(_traceLevels->serverMgr > 2) + { + if(_state == Activating) + { + Ice::Trace out(_traceLevels->logger, _traceLevels->serverMgrCat); + out << "changed server `" << description.name << "' state to `Activating'"; + } + else if(_state == Deactivating) + { + Ice::Trace out(_traceLevels->logger, _traceLevels->serverMgrCat); + out << "changed server `" << description.name << "' state to `Deactivating'"; + } + } + } + notifyAll(); } @@ -215,19 +436,21 @@ IcePack::ServerI::setPid(int pid) } IcePack::ServerManagerI::ServerManagerI(const ObjectAdapterPtr& adapter, + const TraceLevelsPtr& traceLevels, const Freeze::DBEnvironmentPtr& dbEnv, const AdapterManagerPrx& adapterManager, - const ActivatorPrx& activator) : + const ActivatorPtr& activator) : _adapter(adapter), + _traceLevels(traceLevels), _adapterManager(adapterManager), _activator(activator) { - ObjectFactoryPtr serverFactory = new ServerFactory(adapter, activator); + ObjectFactoryPtr serverFactory = new ServerFactory(adapter, _traceLevels, activator); adapter->getCommunicator()->addObjectFactory(serverFactory, "::IcePack::Server"); Freeze::DBPtr dbServers = dbEnv->openDB("servers", true); _evictor = dbServers->createEvictor(Freeze::SaveUponEviction); - _evictor->setSize(100); + _evictor->setSize(1000); _adapter->addServantLocator(_evictor, "server"); // @@ -263,18 +486,27 @@ IcePack::ServerManagerI::create(const ServerDescription& desc, const Current&) { } - ServerPtr serverI = new ServerI(_adapter, _activator); + ServerPtr serverI = new ServerI(_adapter, _traceLevels, _activator); serverI->description = desc; for(AdapterNames::const_iterator p = desc.adapters.begin(); p != desc.adapters.end(); ++p) { AdapterPrx adapter = _adapterManager->findByName(*p); - serverI->adapters.push_back(adapter); + if(adapter) + { + serverI->adapters.push_back(adapter); + } } _evictor->createObject(server->ice_getIdentity(), serverI); _serverNames.insert(desc.name); + if(_traceLevels->serverMgr > 0) + { + Ice::Trace out(_traceLevels->logger, _traceLevels->serverMgrCat); + out << "added server `" << desc.name << "'"; + } + return server; } @@ -310,9 +542,20 @@ IcePack::ServerManagerI::remove(const string& name, const Current&) throw ServerNotExistException(); } + // + // Stop the server before removing it. + // + server->stop(); + _evictor->destroyObject(server->ice_getIdentity()); _serverNames.erase(_serverNames.find(name)); + + if(_traceLevels->serverMgr > 0) + { + Ice::Trace out(_traceLevels->logger, _traceLevels->serverMgrCat); + out << "removed server `" << name << "'"; + } } ServerNames @@ -326,4 +569,3 @@ IcePack::ServerManagerI::getAll(const Current&) return names; } - diff --git a/cpp/src/IcePack/ServerManagerI.h b/cpp/src/IcePack/ServerManagerI.h index 992a0560725..462db298267 100644 --- a/cpp/src/IcePack/ServerManagerI.h +++ b/cpp/src/IcePack/ServerManagerI.h @@ -21,15 +21,19 @@ namespace IcePack { +class TraceLevels; +typedef IceUtil::Handle<TraceLevels> TraceLevelsPtr; + class ServerI : public Server, public ::IceUtil::Monitor< ::IceUtil::Mutex> { public: - ServerI(const ::Ice::ObjectAdapterPtr&, const ActivatorPrx&); + ServerI(const ::Ice::ObjectAdapterPtr&, const TraceLevelsPtr&, const ActivatorPtr&); virtual ~ServerI(); virtual ServerDescription getServerDescription(const ::Ice::Current& = ::Ice::Current()); virtual bool start(const ::Ice::Current& = ::Ice::Current()); + virtual void stop(const ::Ice::Current& = ::Ice::Current()); virtual void terminationCallback(const ::Ice::Current& = ::Ice::Current()); virtual ServerState getState(const ::Ice::Current& = ::Ice::Current()); virtual Ice::Int getPid(const ::Ice::Current& = ::Ice::Current()); @@ -40,7 +44,8 @@ public: private: ::Ice::ObjectAdapterPtr _adapter; - ActivatorPrx _activator; + TraceLevelsPtr _traceLevels; + ActivatorPtr _activator; ServerState _state; int _pid; @@ -51,8 +56,9 @@ class ServerManagerI : public ServerManager, public IceUtil::Mutex { public: - ServerManagerI(const Ice::ObjectAdapterPtr&, const Freeze::DBEnvironmentPtr&, const AdapterManagerPrx&, - const ActivatorPrx&); + ServerManagerI(const Ice::ObjectAdapterPtr&, const TraceLevelsPtr&, const Freeze::DBEnvironmentPtr&, + const AdapterManagerPrx&, const ActivatorPtr&); + virtual ~ServerManagerI(); virtual ServerPrx create(const ServerDescription&, const ::Ice::Current&); @@ -63,10 +69,11 @@ public: private: ::Ice::ObjectAdapterPtr _adapter; + TraceLevelsPtr _traceLevels; ::Freeze::EvictorPtr _evictor; ::std::set< ::std::string> _serverNames; AdapterManagerPrx _adapterManager; - ActivatorPrx _activator; + ActivatorPtr _activator; }; } diff --git a/cpp/src/IcePack/ServiceDeployer.cpp b/cpp/src/IcePack/ServiceDeployer.cpp index 429f5fcaab6..dd617279041 100644 --- a/cpp/src/IcePack/ServiceDeployer.cpp +++ b/cpp/src/IcePack/ServiceDeployer.cpp @@ -147,7 +147,7 @@ IcePack::ServiceDeployer::setDBEnv(const string& dir) } else { - path = dir[0] == '/' ? dir : _variables["basedir"] + "/" + dir; + path = toLocation(dir); } _serverDeployer.addProperty("IceBox.DBEnvName." + _variables["name"], path); } diff --git a/cpp/src/IcePack/TraceLevels.cpp b/cpp/src/IcePack/TraceLevels.cpp new file mode 100644 index 00000000000..35f03f1ee7c --- /dev/null +++ b/cpp/src/IcePack/TraceLevels.cpp @@ -0,0 +1,34 @@ +// ********************************************************************** +// +// Copyright (c) 2001 +// Mutable Realms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#include <Ice/Properties.h> +#include <IcePack/TraceLevels.h> + +using namespace std; +using namespace IcePack; + +TraceLevels::TraceLevels(const Ice::PropertiesPtr& properties, const Ice::LoggerPtr& theLogger) : + serverMgr(0), + serverMgrCat("ServerManager"), + adapterMgr(0), + adapterMgrCat("AdapterManager"), + activator(0), + activatorCat("Activator"), + logger(theLogger) +{ + const string keyBase = "IcePack.Trace."; + const_cast<int&>(serverMgr) = properties->getPropertyAsInt(keyBase + serverMgrCat); + const_cast<int&>(adapterMgr) = properties->getPropertyAsInt(keyBase + adapterMgrCat); + const_cast<int&>(activator) = properties->getPropertyAsInt(keyBase + activatorCat); +} + +TraceLevels::~TraceLevels() +{ +} diff --git a/cpp/src/IcePack/TraceLevels.h b/cpp/src/IcePack/TraceLevels.h new file mode 100644 index 00000000000..dfe8e8425de --- /dev/null +++ b/cpp/src/IcePack/TraceLevels.h @@ -0,0 +1,44 @@ +// ********************************************************************** +// +// Copyright (c) 2002 +// Mutable Realms, Inc. +// Huntsville, AL, USA +// +// All Rights Reserved +// +// ********************************************************************** + +#ifndef ICE_PACK_TRACE_LEVELS_H +#define ICE_PACK_TRACE_LEVELS_H + +#include <IceUtil/Shared.h> +#include <Ice/PropertiesF.h> +#include <Ice/LoggerF.h> + +namespace IcePack +{ + +class TraceLevels : public ::IceUtil::Shared +{ +public: + + TraceLevels(const ::Ice::PropertiesPtr&, const Ice::LoggerPtr&); + virtual ~TraceLevels(); + + const int serverMgr; + const char* serverMgrCat; + + const int adapterMgr; + const char* adapterMgrCat; + + const int activator; + const char* activatorCat; + + const Ice::LoggerPtr logger; +}; + +typedef IceUtil::Handle<TraceLevels> TraceLevelsPtr; + +} // End namespace IcePack + +#endif |