summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/IceGrid/RegistryI.cpp41
-rw-r--r--cpp/src/IceGrid/WellKnownObjectsManager.cpp23
2 files changed, 12 insertions, 52 deletions
diff --git a/cpp/src/IceGrid/RegistryI.cpp b/cpp/src/IceGrid/RegistryI.cpp
index adbeaddf31e..07d2001c05a 100644
--- a/cpp/src/IceGrid/RegistryI.cpp
+++ b/cpp/src/IceGrid/RegistryI.cpp
@@ -447,30 +447,19 @@ RegistryI::setupClientSessionFactory(const Ice::ObjectAdapterPtr& registryAdapte
assert(_reaper);
_clientSessionFactory = new ClientSessionFactory(sessionManagerAdapter, _database, _waitQueue, _reaper);
- if(sessionManagerAdapter)
+ if(sessionManagerAdapter && _master) // Slaves don't support client session manager objects.
{
- //
- // Add the replicated objects (the well-known proxy is updated by
- // the database updateReplicatedWellKnownOjects method).
- //
Identity clientSessionMgrId = _communicator->stringToIdentity(_instanceName + "/SessionManager");
Identity sslClientSessionMgrId = _communicator->stringToIdentity(_instanceName + "/SSLSessionManager");
- sessionManagerAdapter->add(new ClientSessionManagerI(_clientSessionFactory), clientSessionMgrId);
- sessionManagerAdapter->add(new ClientSSLSessionManagerI(_clientSessionFactory), sslClientSessionMgrId);
-
- //
- // Add the per-replica objects (and register a well-known proxy).
- //
- clientSessionMgrId.name += "-" + _replicaName;
- sslClientSessionMgrId.name += "-" + _replicaName;
+
sessionManagerAdapter->add(new ClientSessionManagerI(_clientSessionFactory), clientSessionMgrId);
sessionManagerAdapter->add(new ClientSSLSessionManagerI(_clientSessionFactory), sslClientSessionMgrId);
- _wellKnownObjects->add(sessionManagerAdapter->createProxy(clientSessionMgrId),
- Glacier2::SessionManager::ice_staticId());
+ _wellKnownObjects->add(sessionManagerAdapter->createProxy(clientSessionMgrId),
+ Glacier2::SessionManager::ice_staticId());
- _wellKnownObjects->add(sessionManagerAdapter->createProxy(sslClientSessionMgrId),
- Glacier2::SSLSessionManager::ice_staticId());
+ _wellKnownObjects->add(sessionManagerAdapter->createProxy(sslClientSessionMgrId),
+ Glacier2::SSLSessionManager::ice_staticId());
}
Ice::PropertiesPtr properties = _communicator->getProperties();
@@ -497,20 +486,14 @@ RegistryI::setupAdminSessionFactory(const Ice::ObjectAdapterPtr& registryAdapter
if(sessionManagerAdapter)
{
- //
- // Add the replicated objects (the well-known proxy is updated by
- // the database updateReplicatedWellKnownOjects method).
- //
Identity adminSessionMgrId = _communicator->stringToIdentity(_instanceName + "/AdminSessionManager");
Identity sslAdmSessionMgrId = _communicator->stringToIdentity(_instanceName + "/AdminSSLSessionManager");
- sessionManagerAdapter->add(new AdminSessionManagerI(_adminSessionFactory), adminSessionMgrId);
- sessionManagerAdapter->add(new AdminSSLSessionManagerI(_adminSessionFactory), sslAdmSessionMgrId);
-
- //
- // Add the per-replica objects (and register a well-known proxy).
- //
- adminSessionMgrId.name += "-" + _replicaName;
- sslAdmSessionMgrId.name += "-" + _replicaName;
+ if(!_master)
+ {
+ adminSessionMgrId.name += "-" + _replicaName;
+ sslAdmSessionMgrId.name += "-" + _replicaName;
+ }
+
sessionManagerAdapter->add(new AdminSessionManagerI(_adminSessionFactory), adminSessionMgrId);
sessionManagerAdapter->add(new AdminSSLSessionManagerI(_adminSessionFactory), sslAdmSessionMgrId);
diff --git a/cpp/src/IceGrid/WellKnownObjectsManager.cpp b/cpp/src/IceGrid/WellKnownObjectsManager.cpp
index 2950507069b..25e0c9e52f6 100644
--- a/cpp/src/IceGrid/WellKnownObjectsManager.cpp
+++ b/cpp/src/IceGrid/WellKnownObjectsManager.cpp
@@ -115,29 +115,6 @@ WellKnownObjectsManager::updateReplicatedWellKnownObjects()
info.proxy = replicatedClientProxy->ice_identity(id);
objects.push_back(info);
- Ice::ObjectPrx replicatedSessionManagerProxy = _database->getReplicatedEndpoints("SessionManager",
- _endpoints["SessionManager"]);
-
- id.name = "SessionManager";
- info.type = Glacier2::SessionManager::ice_staticId();
- info.proxy = replicatedSessionManagerProxy->ice_identity(id);
- objects.push_back(info);
-
- id.name = "SSLSessionManager";
- info.type = Glacier2::SessionManager::ice_staticId();
- info.proxy = replicatedSessionManagerProxy->ice_identity(id);
- objects.push_back(info);
-
- id.name = "AdminSessionManager";
- info.type = Glacier2::SessionManager::ice_staticId();
- info.proxy = replicatedSessionManagerProxy->ice_identity(id);
- objects.push_back(info);
-
- id.name = "AdminSSLSessionManager";
- info.type = Glacier2::SessionManager::ice_staticId();
- info.proxy = replicatedSessionManagerProxy->ice_identity(id);
- objects.push_back(info);
-
Ice::ObjectPrx replicatedInternalProxy = _database->getReplicatedEndpoints("Internal", _endpoints["Internal"]);
id.name = "NullPermissionsVerifier";