diff options
author | Benoit Foucher <benoit@zeroc.com> | 2004-03-02 20:08:26 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2004-03-02 20:08:26 +0000 |
commit | caf10576ec77502776c152bdda209e155be11eaa (patch) | |
tree | 942cb1e45c63211cd7f5a12be0a693017fb869c1 /java/src/Ice/ObjectAdapterI.java | |
parent | revising STLport version (diff) | |
download | ice-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 'java/src/Ice/ObjectAdapterI.java')
-rw-r--r-- | java/src/Ice/ObjectAdapterI.java | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/java/src/Ice/ObjectAdapterI.java b/java/src/Ice/ObjectAdapterI.java index 77c9675dad6..2e2d7191f46 100644 --- a/java/src/Ice/ObjectAdapterI.java +++ b/java/src/Ice/ObjectAdapterI.java @@ -39,6 +39,7 @@ public final class ObjectAdapterI extends LocalObjectImpl implements ObjectAdapt Ice.LocatorRegistryPrx locatorRegistry = null; boolean registerProcess = false; String serverId = ""; + boolean printAdapterReady = false; synchronized(this) { @@ -53,6 +54,7 @@ public final class ObjectAdapterI extends LocalObjectImpl implements ObjectAdapt registerProcess = _instance.properties().getPropertyAsInt(_name + ".RegisterProcess") > 0; serverId = _instance.properties().getProperty("Ice.ServerId"); + printAdapterReady = _instance.properties().getPropertyAsInt("Ice.PrintAdapterReady") > 0; if(registerProcess && locatorRegistry == null) { @@ -66,6 +68,8 @@ public final class ObjectAdapterI extends LocalObjectImpl implements ObjectAdapt "without a value for Ice.ServerId"); registerProcess = false; } + + _printAdapterReadyDone = true; } final int sz = _incomingConnectionFactories.size(); @@ -75,16 +79,6 @@ public final class ObjectAdapterI extends LocalObjectImpl implements ObjectAdapt (IceInternal.IncomingConnectionFactory)_incomingConnectionFactories.get(i); factory.activate(); } - - if(!_printAdapterReadyDone) - { - if(_instance.properties().getPropertyAsInt("Ice.PrintAdapterReady") > 0) - { - System.out.println(_name + " ready"); - } - } - - _printAdapterReadyDone = true; } // @@ -138,6 +132,11 @@ public final class ObjectAdapterI extends LocalObjectImpl implements ObjectAdapt } } } + + if(printAdapterReady) + { + System.out.println(_name + " ready"); + } } public synchronized void |