summaryrefslogtreecommitdiff
path: root/java/src/IceBox/ServiceManagerI.java
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2007-08-31 09:32:00 -0230
committerDwayne Boone <dwayne@zeroc.com>2007-08-31 09:32:00 -0230
commit42b58d049d572c176dbf19e1f393d6f61705c6f1 (patch)
treec769867970bd60616e215605709d4320dee6e36e /java/src/IceBox/ServiceManagerI.java
parentbug 2433 - use Ice.Plugin.Logger instead of Ice.LoggerPlugin to load logger f... (diff)
downloadice-42b58d049d572c176dbf19e1f393d6f61705c6f1.tar.bz2
ice-42b58d049d572c176dbf19e1f393d6f61705c6f1.tar.xz
ice-42b58d049d572c176dbf19e1f393d6f61705c6f1.zip
bug 2441 - Do not require IceBoc.ServiceManager.Endpoints to be set
Diffstat (limited to 'java/src/IceBox/ServiceManagerI.java')
-rw-r--r--java/src/IceBox/ServiceManagerI.java37
1 files changed, 22 insertions, 15 deletions
diff --git a/java/src/IceBox/ServiceManagerI.java b/java/src/IceBox/ServiceManagerI.java
index 000e08bba92..d63bb237763 100644
--- a/java/src/IceBox/ServiceManagerI.java
+++ b/java/src/IceBox/ServiceManagerI.java
@@ -123,19 +123,23 @@ public class ServiceManagerI extends _ServiceManagerDisp
{
try
{
+ Ice.Properties properties = _server.communicator().getProperties();
+
//
// Create an object adapter. Services probably should NOT share
// this object adapter, as the endpoint(s) for this object adapter
// will most likely need to be firewalled for security reasons.
//
- Ice.ObjectAdapter adapter = _server.communicator().createObjectAdapter("IceBox.ServiceManager");
-
- Ice.Properties properties = _server.communicator().getProperties();
+ Ice.ObjectAdapter adapter = null;
+ if(!properties.getProperty("IceBox.ServiceManager.Endpoints").equals(""))
+ {
+ adapter = _server.communicator().createObjectAdapter("IceBox.ServiceManager");
- Ice.Identity identity = new Ice.Identity();
- identity.category = properties.getPropertyWithDefault("IceBox.InstanceName", "IceBox");
- identity.name = "ServiceManager";
- adapter.add(this, identity);
+ Ice.Identity identity = new Ice.Identity();
+ identity.category = properties.getPropertyWithDefault("IceBox.InstanceName", "IceBox");
+ identity.name = "ServiceManager";
+ adapter.add(this, identity);
+ }
//
// Parse the IceBox.LoadOrder property.
@@ -216,15 +220,18 @@ public class ServiceManagerI extends _ServiceManagerDisp
//
// Start request dispatching after we've started the services.
//
- try
- {
- adapter.activate();
- }
- catch(Ice.ObjectAdapterDeactivatedException ex)
+ if(adapter != null)
{
- //
- // Expected if the communicator has been shutdown.
- //
+ try
+ {
+ adapter.activate();
+ }
+ catch(Ice.ObjectAdapterDeactivatedException ex)
+ {
+ //
+ // Expected if the communicator has been shutdown.
+ //
+ }
}
_server.communicator().waitForShutdown();