summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/demo/IceGrid/icebox/config.grid1
-rw-r--r--cpp/demo/IceStorm/replicated/config.grid1
-rwxr-xr-xcpp/demo/IceStorm/replicated/expect.py2
-rw-r--r--cpp/src/Ice/OutgoingAsync.cpp2
-rw-r--r--cpp/src/Ice/PropertyNames.cpp15
-rw-r--r--cpp/src/Ice/PropertyNames.h2
-rw-r--r--cpp/src/IceGrid/RegistryI.cpp48
-rw-r--r--cpp/src/IceGrid/RegistryI.h4
-rw-r--r--cpp/src/IceGrid/SessionServantManager.cpp3
9 files changed, 22 insertions, 56 deletions
diff --git a/cpp/demo/IceGrid/icebox/config.grid b/cpp/demo/IceGrid/icebox/config.grid
index 7515bf57725..6cf76f76f78 100644
--- a/cpp/demo/IceGrid/icebox/config.grid
+++ b/cpp/demo/IceGrid/icebox/config.grid
@@ -14,7 +14,6 @@ Ice.Default.Locator=DemoIceGrid/Locator:default -p 4061
IceGrid.Registry.Client.Endpoints=default -p 4061
IceGrid.Registry.Server.Endpoints=default
IceGrid.Registry.Internal.Endpoints=default
-IceGrid.Registry.AdminCallbackRouter.Endpoints=default
#
# Enable the admin session manager for use with Glacier2.
diff --git a/cpp/demo/IceStorm/replicated/config.grid b/cpp/demo/IceStorm/replicated/config.grid
index 30b8c75c8e3..913b68efb68 100644
--- a/cpp/demo/IceStorm/replicated/config.grid
+++ b/cpp/demo/IceStorm/replicated/config.grid
@@ -14,7 +14,6 @@ Ice.Default.Locator=DemoIceGrid/Locator:default -p 4061
IceGrid.Registry.Client.Endpoints=default -p 4061
IceGrid.Registry.Server.Endpoints=default
IceGrid.Registry.Internal.Endpoints=default
-IceGrid.Registry.AdminCallbackRouter.Endpoints=default
IceGrid.Registry.Data=db/registry
IceGrid.Registry.PermissionsVerifier=DemoIceGrid/NullPermissionsVerifier
IceGrid.Registry.AdminPermissionsVerifier=DemoIceGrid/NullPermissionsVerifier
diff --git a/cpp/demo/IceStorm/replicated/expect.py b/cpp/demo/IceStorm/replicated/expect.py
index 723c0095d8a..aa8c85bba0e 100755
--- a/cpp/demo/IceStorm/replicated/expect.py
+++ b/cpp/demo/IceStorm/replicated/expect.py
@@ -52,7 +52,7 @@ else:
print "starting icegridnode...",
sys.stdout.flush()
node = demoscript.Util.spawn('icegridnode --Ice.Config=config.grid --Ice.PrintAdapterReady %s' % (args))
-node.expect('IceGrid.Registry.Server ready\r{1,2}\nIceGrid.Registry.AdminCallbackRouter ready\r{1,2}\nIceGrid.Registry.Client ready\r{1,2}\nIceGrid.Node ready')
+node.expect('IceGrid.Registry.Server ready\r{1,2}\nIceGrid.Registry.Client ready\r{1,2}\nIceGrid.Node ready')
print "ok"
print "deploying application...",
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),