diff options
author | Benoit Foucher <benoit@zeroc.com> | 2005-06-09 14:33:56 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2005-06-09 14:33:56 +0000 |
commit | dd4155ec2f0c543061e3a08d0938c5f8aff227c7 (patch) | |
tree | 5feac0309fb01f2da479179ddc23d93a407ceae9 /cpp/src/IceGrid/ServerI.cpp | |
parent | adding support classes for CLDC support (diff) | |
download | ice-dd4155ec2f0c543061e3a08d0938c5f8aff227c7.tar.bz2 ice-dd4155ec2f0c543061e3a08d0938c5f8aff227c7.tar.xz ice-dd4155ec2f0c543061e3a08d0938c5f8aff227c7.zip |
Added support for sessions and node/registry observers
Diffstat (limited to 'cpp/src/IceGrid/ServerI.cpp')
-rw-r--r-- | cpp/src/IceGrid/ServerI.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp index 1bf50be09a2..93826d41e8a 100644 --- a/cpp/src/IceGrid/ServerI.cpp +++ b/cpp/src/IceGrid/ServerI.cpp @@ -446,6 +446,13 @@ ServerI::setProcess(const ::Ice::ProcessPrx& proc, const ::Ice::Current&) notifyAll(); } +StringAdapterPrxDict +ServerI::getAdapters(const Ice::Current&) +{ + Lock sync(*this); + return _adapters; +} + void ServerI::stopInternal(bool kill, const Ice::Current& current) { @@ -572,7 +579,14 @@ ServerI::setStateNoSync(ServerState st, const Ice::Current& current) ServerDynamicInfo info; info.name = _name; info.state = st; - info.pid = getPid(current); + // + // NOTE: this must be done only for the active state. + // Otherwise, we could get a deadlock since getPid() + // will lock the activator and since this method might + // be called from the activator locked. + // + info.pid = st == Active ? getPid(current) : 0; + try { observer->updateServer(_node->getName(current), info); |