summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ObjectAdapterI.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2004-03-02 20:08:26 +0000
committerBenoit Foucher <benoit@zeroc.com>2004-03-02 20:08:26 +0000
commitcaf10576ec77502776c152bdda209e155be11eaa (patch)
tree942cb1e45c63211cd7f5a12be0a693017fb869c1 /cpp/src/Ice/ObjectAdapterI.cpp
parentrevising STLport version (diff)
downloadice-caf10576ec77502776c152bdda209e155be11eaa.tar.bz2
ice-caf10576ec77502776c152bdda209e155be11eaa.tar.xz
ice-caf10576ec77502776c152bdda209e155be11eaa.zip
Moved the adapter ready message after the adapter registration with the
locator registry (to make sure adapter is registered before the adapter claims it's ready).
Diffstat (limited to 'cpp/src/Ice/ObjectAdapterI.cpp')
-rw-r--r--cpp/src/Ice/ObjectAdapterI.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp
index 60d86d66612..b608ae145b4 100644
--- a/cpp/src/Ice/ObjectAdapterI.cpp
+++ b/cpp/src/Ice/ObjectAdapterI.cpp
@@ -67,6 +67,7 @@ Ice::ObjectAdapterI::activate()
LocatorRegistryPrx locatorRegistry;
bool registerProcess = false;
string serverId;
+ bool printAdapterReady = false;
{
IceUtil::Monitor<IceUtil::RecMutex>::Lock sync(*this);
@@ -82,6 +83,7 @@ Ice::ObjectAdapterI::activate()
registerProcess = _instance->properties()->getPropertyAsInt(_name + ".RegisterProcess") > 0;
serverId = _instance->properties()->getProperty("Ice.ServerId");
+ printAdapterReady = _instance->properties()->getPropertyAsInt("Ice.PrintAdapterReady") > 0;
if(registerProcess && !locatorRegistry)
{
@@ -95,20 +97,12 @@ Ice::ObjectAdapterI::activate()
out << "object adapter `" << _name << "' cannot register the process without a value for Ice.ServerId";
registerProcess = false;
}
+
+ _printAdapterReadyDone = true;
}
for_each(_incomingConnectionFactories.begin(), _incomingConnectionFactories.end(),
- Ice::voidMemFun(&IncomingConnectionFactory::activate));
-
- if(!_printAdapterReadyDone)
- {
- if(_instance->properties()->getPropertyAsInt("Ice.PrintAdapterReady") > 0)
- {
- cout << _name << " ready" << endl;
- }
- }
-
- _printAdapterReadyDone = true;
+ Ice::voidMemFun(&IncomingConnectionFactory::activate));
}
//
@@ -161,6 +155,11 @@ Ice::ObjectAdapterI::activate()
}
}
}
+
+ if(printAdapterReady)
+ {
+ cout << _name << " ready" << endl;
+ }
}
void