diff options
author | Benoit Foucher <benoit@zeroc.com> | 2008-04-09 17:08:17 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2008-04-09 17:08:17 +0200 |
commit | abefabeae65261c96f34877ff286b406bfb09d73 (patch) | |
tree | 83df2a93bd544e0a9ec2d935654177736c6f1e2e /cpp/src | |
parent | amended README.txt to mention object by value (diff) | |
download | ice-abefabeae65261c96f34877ff286b406bfb09d73.tar.bz2 ice-abefabeae65261c96f34877ff286b406bfb09d73.tar.xz ice-abefabeae65261c96f34877ff286b406bfb09d73.zip |
Removed IceGrid AdminCallbackRouter object adapter (bug 2998)
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/OutgoingAsync.cpp | 2 | ||||
-rw-r--r-- | cpp/src/Ice/PropertyNames.cpp | 15 | ||||
-rw-r--r-- | cpp/src/Ice/PropertyNames.h | 2 | ||||
-rw-r--r-- | cpp/src/IceGrid/RegistryI.cpp | 48 | ||||
-rw-r--r-- | cpp/src/IceGrid/RegistryI.h | 4 | ||||
-rw-r--r-- | cpp/src/IceGrid/SessionServantManager.cpp | 3 |
6 files changed, 21 insertions, 53 deletions
diff --git a/cpp/src/Ice/OutgoingAsync.cpp b/cpp/src/Ice/OutgoingAsync.cpp index c2ffd7cbd82..14da19924e7 100644 --- a/cpp/src/Ice/OutgoingAsync.cpp +++ b/cpp/src/Ice/OutgoingAsync.cpp @@ -184,7 +184,7 @@ IceInternal::OutgoingAsyncMessageCallback::__warning(const InstancePtr& instance if(instance->initializationData().properties->getPropertyAsIntWithDefault("Ice.Warn.AMICallback", 1) > 0) { Warning out(instance->initializationData().logger); - const Exception* ex = dynamic_cast<const ObjectNotExistException*>(&exc); + const Exception* ex = dynamic_cast<const Exception*>(&exc); if(ex) { out << "Ice::Exception raised by AMI callback:\n" << ex; diff --git a/cpp/src/Ice/PropertyNames.cpp b/cpp/src/Ice/PropertyNames.cpp index 6142c964277..476487e0893 100644 --- a/cpp/src/Ice/PropertyNames.cpp +++ b/cpp/src/Ice/PropertyNames.cpp @@ -7,7 +7,7 @@ // // ********************************************************************** // -// Generated by makeprops.py from file ../config/PropertyNames.xml, Mon Mar 3 22:29:56 2008 +// Generated by makeprops.py from file ../config/PropertyNames.xml, Wed Apr 9 16:48:51 2008 // IMPORTANT: Do not edit this file -- any edits made here will be lost! @@ -228,19 +228,6 @@ const IceInternal::Property IceGridPropsData[] = IceInternal::Property("IceGrid.Node.UserAccountMapper.CollocationOptimized", false, 0), IceInternal::Property("IceGrid.Node.UserAccountMapper", false, 0), IceInternal::Property("IceGrid.Node.WaitTime", false, 0), - IceInternal::Property("IceGrid.Registry.AdminCallbackRouter.AdapterId", false, 0), - IceInternal::Property("IceGrid.Registry.AdminCallbackRouter.Endpoints", false, 0), - IceInternal::Property("IceGrid.Registry.AdminCallbackRouter.Locator", false, 0), - IceInternal::Property("IceGrid.Registry.AdminCallbackRouter.PublishedEndpoints", false, 0), - IceInternal::Property("IceGrid.Registry.AdminCallbackRouter.RegisterProcess", true, 0), - IceInternal::Property("IceGrid.Registry.AdminCallbackRouter.ReplicaGroupId", false, 0), - IceInternal::Property("IceGrid.Registry.AdminCallbackRouter.Router", false, 0), - IceInternal::Property("IceGrid.Registry.AdminCallbackRouter.ProxyOptions", false, 0), - IceInternal::Property("IceGrid.Registry.AdminCallbackRouter.ThreadPool.Size", false, 0), - IceInternal::Property("IceGrid.Registry.AdminCallbackRouter.ThreadPool.SizeMax", false, 0), - IceInternal::Property("IceGrid.Registry.AdminCallbackRouter.ThreadPool.SizeWarn", false, 0), - IceInternal::Property("IceGrid.Registry.AdminCallbackRouter.ThreadPool.StackSize", false, 0), - IceInternal::Property("IceGrid.Registry.AdminCallbackRouter.ThreadPool.Serialize", false, 0), IceInternal::Property("IceGrid.Registry.AdminCryptPasswords", false, 0), IceInternal::Property("IceGrid.Registry.AdminPermissionsVerifier.EndpointSelection", false, 0), IceInternal::Property("IceGrid.Registry.AdminPermissionsVerifier.ConnectionCached", false, 0), diff --git a/cpp/src/Ice/PropertyNames.h b/cpp/src/Ice/PropertyNames.h index a3400f78f22..06d43e50f5e 100644 --- a/cpp/src/Ice/PropertyNames.h +++ b/cpp/src/Ice/PropertyNames.h @@ -7,7 +7,7 @@ // // ********************************************************************** // -// Generated by makeprops.py from file ../config/PropertyNames.xml, Mon Mar 3 22:29:56 2008 +// Generated by makeprops.py from file ../config/PropertyNames.xml, Wed Apr 9 16:48:51 2008 // IMPORTANT: Do not edit this file -- any edits made here will be lost! diff --git a/cpp/src/IceGrid/RegistryI.cpp b/cpp/src/IceGrid/RegistryI.cpp index 5c3c9122194..4a586d4a348 100644 --- a/cpp/src/IceGrid/RegistryI.cpp +++ b/cpp/src/IceGrid/RegistryI.cpp @@ -252,10 +252,9 @@ RegistryI::start() setupThreadPool(properties, "Ice.ThreadPool.Client", 1, 100); setupThreadPool(properties, "IceGrid.Registry.Client.ThreadPool", 1, 10); - setupThreadPool(properties, "IceGrid.Registry.Server.ThreadPool", 1, 10); + setupThreadPool(properties, "IceGrid.Registry.Server.ThreadPool", 1, 10, true); // Serialize for admin callbacks setupThreadPool(properties, "IceGrid.Registry.SessionManager.ThreadPool", 1, 10); setupThreadPool(properties, "IceGrid.Registry.Internal.ThreadPool", 1, 100); - setupThreadPool(properties, "IceGrid.Registry.AdminCallbackRouter.ThreadPool", 1, 1); _replicaName = properties->getPropertyWithDefault("IceGrid.Registry.ReplicaName", "Master"); _master = _replicaName == "Master"; @@ -383,13 +382,13 @@ RegistryI::start() registerNodes(internalRegistry, _session.getNodes(nodes)); } - ObjectAdapterPtr serverAdapter = _communicator->createObjectAdapter("IceGrid.Registry.Server"); + _serverAdapter = _communicator->createObjectAdapter("IceGrid.Registry.Server"); _clientAdapter = _communicator->createObjectAdapter("IceGrid.Registry.Client"); Ice::Identity dummy; dummy.name = "dummy"; _wellKnownObjects->addEndpoint("Client", _clientAdapter->createDirectProxy(dummy)); - _wellKnownObjects->addEndpoint("Server", serverAdapter->createDirectProxy(dummy)); + _wellKnownObjects->addEndpoint("Server", _serverAdapter->createDirectProxy(dummy)); _wellKnownObjects->addEndpoint("Internal", registryAdapter->createDirectProxy(dummy)); setupNullPermissionsVerifier(registryAdapter); @@ -401,16 +400,9 @@ RegistryI::start() QueryPrx query = setupQuery(_clientAdapter); RegistryPrx registry = setupRegistry(_clientAdapter); - Ice::LocatorRegistryPrx locatorRegistry = setupLocatorRegistry(serverAdapter); + Ice::LocatorRegistryPrx locatorRegistry = setupLocatorRegistry(_serverAdapter); LocatorPrx internalLocator = setupLocator(_clientAdapter, registryAdapter, locatorRegistry, registry, query); - AdminCallbackRouterPtr adminCallbackRouter; - - if(!properties->getProperty("IceGrid.Registry.AdminCallbackRouter.Endpoints").empty()) - { - adminCallbackRouter = new AdminCallbackRouter; - } - // // Create the session servant manager. The session servant manager is responsible // for managing sessions servants and to ensure that session servants are only @@ -418,17 +410,13 @@ RegistryI::start() // also takes care of providing the router servant for server admin objects. // ObjectPtr serverAdminRouter = new RegistryServerAdminRouter(_database); + AdminCallbackRouterPtr adminCallbackRouter = new AdminCallbackRouter; _servantManager = new SessionServantManager(_clientAdapter, _instanceName, true, getServerAdminCategory(), serverAdminRouter, adminCallbackRouter); - _clientAdapter->addServantLocator(_servantManager, ""); - - if(adminCallbackRouter != 0) - { - _adminCallbackRouterAdapter = _communicator->createObjectAdapter("IceGrid.Registry.AdminCallbackRouter"); - _adminCallbackRouterAdapter->addServantLocator(new DefaultServantLocator(adminCallbackRouter), ""); - } + _clientAdapter->addServantLocator(_servantManager, ""); + _serverAdapter->addServantLocator(new DefaultServantLocator(adminCallbackRouter), ""); ObjectAdapterPtr sessionAdpt = setupClientSessionFactory(registryAdapter, internalLocator); ObjectAdapterPtr admSessionAdpt = setupAdminSessionFactory(registryAdapter, serverAdminRouter, internalLocator); @@ -446,11 +434,7 @@ RegistryI::start() // // We are ready to go! // - serverAdapter->activate(); - if(_adminCallbackRouterAdapter != 0) - { - _adminCallbackRouterAdapter->activate(); - } + _serverAdapter->activate(); _clientAdapter->activate(); if(sessionAdpt) @@ -990,18 +974,11 @@ RegistryI::shutdown() Ice::ObjectPrx RegistryI::createAdminCallbackProxy(const Identity& id) const { - if(_adminCallbackRouterAdapter != 0) - { - return _adminCallbackRouterAdapter->createProxy(id); - } - else - { - return 0; - } + return _serverAdapter->createProxy(id); } void -RegistryI::setupThreadPool(const PropertiesPtr& properties, const string& name, int size, int sizeMax) +RegistryI::setupThreadPool(const PropertiesPtr& properties, const string& name, int size, int sizeMax, bool serialize) { if(properties->getPropertyAsIntWithDefault(name + ".Size", 0) < size) { @@ -1025,6 +1002,11 @@ RegistryI::setupThreadPool(const PropertiesPtr& properties, const string& name, os << sizeMax; properties->setProperty(name + ".SizeMax", os.str()); } + + if(serialize) + { + properties->setProperty(name + ".Serialize", "1"); + } } Glacier2::PermissionsVerifierPrx diff --git a/cpp/src/IceGrid/RegistryI.h b/cpp/src/IceGrid/RegistryI.h index 516747d469e..7d82c5c6afb 100644 --- a/cpp/src/IceGrid/RegistryI.h +++ b/cpp/src/IceGrid/RegistryI.h @@ -86,7 +86,7 @@ private: Ice::ObjectAdapterPtr setupAdminSessionFactory(const Ice::ObjectAdapterPtr&, const Ice::ObjectPtr&, const LocatorPrx&); - void setupThreadPool(const Ice::PropertiesPtr&, const std::string&, int, int = 0); + void setupThreadPool(const Ice::PropertiesPtr&, const std::string&, int, int = 0, bool = false); Glacier2::PermissionsVerifierPrx getPermissionsVerifier(const Ice::ObjectAdapterPtr&, const LocatorPrx&, const std::string&, const std::string&); @@ -103,7 +103,7 @@ private: DatabasePtr _database; Ice::ObjectAdapterPtr _clientAdapter; - Ice::ObjectAdapterPtr _adminCallbackRouterAdapter; + Ice::ObjectAdapterPtr _serverAdapter; WellKnownObjectsManagerPtr _wellKnownObjects; std::string _instanceName; bool _master; diff --git a/cpp/src/IceGrid/SessionServantManager.cpp b/cpp/src/IceGrid/SessionServantManager.cpp index 6f19761a880..868e86ec320 100644 --- a/cpp/src/IceGrid/SessionServantManager.cpp +++ b/cpp/src/IceGrid/SessionServantManager.cpp @@ -24,8 +24,7 @@ SessionServantManager::SessionServantManager(const Ice::ObjectAdapterPtr& adapte bool checkConnection, const string& serverAdminCategory, const Ice::ObjectPtr& serverAdminRouter, - const AdminCallbackRouterPtr& adminCallbackRouter - ) : + const AdminCallbackRouterPtr& adminCallbackRouter) : _adapter(adapter), _instanceName(instanceName), _checkConnection(checkConnection), |