summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2019-08-20 09:42:17 -0400
committerGitHub <noreply@github.com>2019-08-20 09:42:17 -0400
commit1a278b1da7a74f339a5c6dead1d027ff0f3f5645 (patch)
tree14403ee3f43bd92ecca89310bb14af0ad7514d8e /java
parentAdd second adapter count to test script. (diff)
downloadice-1a278b1da7a74f339a5c6dead1d027ff0f3f5645.tar.bz2
ice-1a278b1da7a74f339a5c6dead1d027ff0f3f5645.tar.xz
ice-1a278b1da7a74f339a5c6dead1d027ff0f3f5645.zip
Move IceBox.PrintServicesReady output after creation of Admin object.
Fixes #471
Diffstat (limited to 'java')
-rw-r--r--java/src/IceBox/src/main/java/com/zeroc/IceBox/ServiceManagerI.java51
1 files changed, 18 insertions, 33 deletions
diff --git a/java/src/IceBox/src/main/java/com/zeroc/IceBox/ServiceManagerI.java b/java/src/IceBox/src/main/java/com/zeroc/IceBox/ServiceManagerI.java
index 4c6e5094e3b..6395e333fe5 100644
--- a/java/src/IceBox/src/main/java/com/zeroc/IceBox/ServiceManagerI.java
+++ b/java/src/IceBox/src/main/java/com/zeroc/IceBox/ServiceManagerI.java
@@ -388,31 +388,16 @@ public class ServiceManagerI implements ServiceManager
}
//
- // We may want to notify external scripts that the services
- // have started. This is done by defining the property:
- //
- // IceBox.PrintServicesReady=bundleName
- //
- // Where bundleName is whatever you choose to call this set of
- // services. It will be echoed back as "bundleName ready".
- //
- // This must be done after start() has been invoked on the
- // services.
- //
- String bundleName = properties.getProperty("IceBox.PrintServicesReady");
- if(bundleName.length() > 0)
- {
- System.out.println(bundleName + " ready");
- }
-
- //
- // Register "this" as a facet to the Admin object and
- // create Admin object
+ // Start Admin (if enabled) and/or deprecated IceBox.ServiceManager OA
//
+ _communicator.addAdminFacet(this, "IceBox.ServiceManager");
try
{
- _communicator.addAdminFacet(this, "IceBox.ServiceManager");
_communicator.getAdmin();
+ if(adapter != null)
+ {
+ adapter.activate();
+ }
}
catch(com.zeroc.Ice.ObjectAdapterDeactivatedException ex)
{
@@ -422,20 +407,20 @@ public class ServiceManagerI implements ServiceManager
}
//
- // Start request dispatching after we've started the services.
+ // We may want to notify external scripts that the services
+ // have started and that IceBox is "ready".
+ // This is done by defining the property IceBox.PrintServicesReady=bundleName
+ //
+ // bundleName is whatever you choose to call this set of
+ // services. It will be echoed back as "bundleName ready".
//
- if(adapter != null)
+ // This must be done after start() has been invoked on the
+ // services.
+ //
+ String bundleName = properties.getProperty("IceBox.PrintServicesReady");
+ if(bundleName.length() > 0)
{
- try
- {
- adapter.activate();
- }
- catch(com.zeroc.Ice.ObjectAdapterDeactivatedException ex)
- {
- //
- // Expected if the communicator has been shutdown.
- //
- }
+ System.out.println(bundleName + " ready");
}
_communicator.waitForShutdown();