summaryrefslogtreecommitdiff
path: root/cpp/src/Glacier2/SessionRouterI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Glacier2/SessionRouterI.cpp')
-rw-r--r--cpp/src/Glacier2/SessionRouterI.cpp36
1 files changed, 22 insertions, 14 deletions
diff --git a/cpp/src/Glacier2/SessionRouterI.cpp b/cpp/src/Glacier2/SessionRouterI.cpp
index 830bb978243..28944c97701 100644
--- a/cpp/src/Glacier2/SessionRouterI.cpp
+++ b/cpp/src/Glacier2/SessionRouterI.cpp
@@ -634,22 +634,30 @@ Glacier2::SessionRouterI::SessionRouterI(const InstancePtr& instance,
Identity routerId;
routerId.category = _instance->properties()->getPropertyWithDefault("Glacier2.InstanceName", "Glacier2");
routerId.name = "router";
- _instance->clientObjectAdapter()->add(this, routerId);
- //
- // All other calls on the client object adapter are dispatched to
- // a router servant based on connection information.
- //
- _instance->clientObjectAdapter()->addServantLocator(new ClientLocator(this), "");
-
- //
- // If there is a server object adapter, all calls on this adapter
- // are dispatched to a router servant based on the category field
- // of the identity.
- //
- if(_instance->serverObjectAdapter())
+ try
+ {
+ _instance->clientObjectAdapter()->add(this, routerId);
+
+ //
+ // All other calls on the client object adapter are dispatched to
+ // a router servant based on connection information.
+ //
+ _instance->clientObjectAdapter()->addServantLocator(new ClientLocator(this), "");
+
+ //
+ // If there is a server object adapter, all calls on this adapter
+ // are dispatched to a router servant based on the category field
+ // of the identity.
+ //
+ if(_instance->serverObjectAdapter())
+ {
+ _instance->serverObjectAdapter()->addServantLocator(new ServerLocator(this), "");
+ }
+ }
+ catch(const Ice::ObjectAdapterDeactivatedException&)
{
- _instance->serverObjectAdapter()->addServantLocator(new ServerLocator(this), "");
+ // Ignore.
}
if(_sessionThread)