diff options
author | Marc Laukien <marc@zeroc.com> | 2003-02-06 15:24:04 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2003-02-06 15:24:04 +0000 |
commit | 163524e3cc1a379aba34c21d7702c4e70d56c42e (patch) | |
tree | 661bbd0ecd52c1969a49843cf0c73585a104184a | |
parent | fixed connection shutdown problem (diff) | |
download | ice-163524e3cc1a379aba34c21d7702c4e70d56c42e.tar.bz2 ice-163524e3cc1a379aba34c21d7702c4e70d56c42e.tar.xz ice-163524e3cc1a379aba34c21d7702c4e70d56c42e.zip |
fix
-rw-r--r-- | cpp/src/Ice/ObjectAdapterI.cpp | 8 | ||||
-rw-r--r-- | java/src/Ice/ObjectAdapterI.java | 12 |
2 files changed, 15 insertions, 5 deletions
diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp index 8227753a4d4..94cc1baa354 100644 --- a/cpp/src/Ice/ObjectAdapterI.cpp +++ b/cpp/src/Ice/ObjectAdapterI.cpp @@ -526,9 +526,13 @@ Ice::ObjectAdapterI::getThreadPool() const ServantManagerPtr Ice::ObjectAdapterI::getServantManager() const { - IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this); + // No mutex lock necessary, _threadPool and _instance are + // immutable after creation until they are removed in + // waitForDeactivate(). - checkForDeactivation(); + // Not check for deactivation here! + + assert(_instance); // Must not be called after waitForDeactivate(). return _servantManager; } diff --git a/java/src/Ice/ObjectAdapterI.java b/java/src/Ice/ObjectAdapterI.java index 04d0ced5a95..5b208d09d31 100644 --- a/java/src/Ice/ObjectAdapterI.java +++ b/java/src/Ice/ObjectAdapterI.java @@ -526,11 +526,17 @@ public final class ObjectAdapterI extends LocalObjectImpl implements ObjectAdapt } } - public synchronized IceInternal.ServantManager + public IceInternal.ServantManager getServantManager() - { - checkForDeactivation(); + { + // No mutex lock necessary, _threadPool and _instance are + // immutable after creation until they are removed in + // waitForDeactivate(). + // Not check for deactivation here! + + assert(_instance != null); // Must not be called after waitForDeactivate(). + return _servantManager; } |