summaryrefslogtreecommitdiff
path: root/cpp/demo/Ice/session/SessionFactoryI.cpp
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2005-04-14 09:59:36 +0000
committerMatthew Newhook <matthew@zeroc.com>2005-04-14 09:59:36 +0000
commit978b336fb47f5679f3b56fbbd190f6a10b658555 (patch)
tree68a9d9e3b8eb52fb4a356510c4d3a9181cf52aa6 /cpp/demo/Ice/session/SessionFactoryI.cpp
parentremove mutex protection on shutdown. (diff)
downloadice-978b336fb47f5679f3b56fbbd190f6a10b658555.tar.bz2
ice-978b336fb47f5679f3b56fbbd190f6a10b658555.tar.xz
ice-978b336fb47f5679f3b56fbbd190f6a10b658555.zip
handle ObjectAdapterDeactivatedException.
Diffstat (limited to 'cpp/demo/Ice/session/SessionFactoryI.cpp')
-rwxr-xr-xcpp/demo/Ice/session/SessionFactoryI.cpp23
1 files changed, 4 insertions, 19 deletions
diff --git a/cpp/demo/Ice/session/SessionFactoryI.cpp b/cpp/demo/Ice/session/SessionFactoryI.cpp
index b1c2a3b0335..53e50a8406f 100755
--- a/cpp/demo/Ice/session/SessionFactoryI.cpp
+++ b/cpp/demo/Ice/session/SessionFactoryI.cpp
@@ -111,30 +111,15 @@ SessionFactoryI::destroy()
_reapThread->getThreadControl().join();
_reapThread = 0;
- //
- // XXX: There is an issue. This is called post after the
- // communicator->waitForShutdown() has been called. Then it
- // attempts to unregister each of the objects from the OA. This
- // causes an ObjectAdapterDeactivatedException. I think you should
- // be permitted to unregister objects even if the OA has been
- // deactivated. Note the documentation in the slice doesn't say
- // that you cannot call remove after the OA has been deactivated.
- //
- // Either Ice must be fixed, or destroy() should be called from
- // shutdown() (which isn't nice since it means I need a _destroy
- // flag, plus other things since other calls could be in
- // progress), or I must catch ObjectAdapaterDeactivateException,
- // or destroy() shouldn't call destroyCallback() on the sessions
- // (which I also don't think is very nice).
- //
-/*
for(list<pair<SessionIPtr, Ice::Identity> >::const_iterator p = _sessions.begin();
p != _sessions.end();
++p)
{
p->first->destroyCallback();
- _adapter->remove(p->second);
+
+ // When the session factory is destroyed the OA is deactivated
+ // and all servants have been // removed so calling remove on
+ // the OA is not necessary.
}
_sessions.clear();
-*/
}