diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2007-08-31 09:32:00 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2007-08-31 09:32:00 -0230 |
commit | 42b58d049d572c176dbf19e1f393d6f61705c6f1 (patch) | |
tree | c769867970bd60616e215605709d4320dee6e36e /cpp/src/IceBox/ServiceManagerI.cpp | |
parent | bug 2433 - use Ice.Plugin.Logger instead of Ice.LoggerPlugin to load logger f... (diff) | |
download | ice-42b58d049d572c176dbf19e1f393d6f61705c6f1.tar.bz2 ice-42b58d049d572c176dbf19e1f393d6f61705c6f1.tar.xz ice-42b58d049d572c176dbf19e1f393d6f61705c6f1.zip |
bug 2441 - Do not require IceBoc.ServiceManager.Endpoints to be set
Diffstat (limited to 'cpp/src/IceBox/ServiceManagerI.cpp')
-rw-r--r-- | cpp/src/IceBox/ServiceManagerI.cpp | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/cpp/src/IceBox/ServiceManagerI.cpp b/cpp/src/IceBox/ServiceManagerI.cpp index 7664b0890ac..e75dd7fee26 100644 --- a/cpp/src/IceBox/ServiceManagerI.cpp +++ b/cpp/src/IceBox/ServiceManagerI.cpp @@ -141,19 +141,23 @@ IceBox::ServiceManagerI::start() try { ServiceManagerPtr obj = this; + PropertiesPtr properties = _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. // - ObjectAdapterPtr adapter = _communicator->createObjectAdapter("IceBox.ServiceManager"); + ObjectAdapterPtr adapter; + if(properties->getProperty("IceBox.ServiceManager.Endpoints") != "") + { + adapter = _communicator->createObjectAdapter("IceBox.ServiceManager"); - PropertiesPtr properties = _communicator->getProperties(); - Identity identity; - identity.category = properties->getPropertyWithDefault("IceBox.InstanceName", "IceBox"); - identity.name = "ServiceManager"; - adapter->add(obj, identity); + Identity identity; + identity.category = properties->getPropertyWithDefault("IceBox.InstanceName", "IceBox"); + identity.name = "ServiceManager"; + adapter->add(obj, identity); + } // // Parse the IceBox.LoadOrder property. @@ -228,15 +232,18 @@ IceBox::ServiceManagerI::start() cout << bundleName << " ready" << endl; } - try - { - adapter->activate(); - } - catch(const ObjectAdapterDeactivatedException&) + if(adapter) { - // - // Expected if the communicator has been shutdown. - // + try + { + adapter->activate(); + } + catch(const ObjectAdapterDeactivatedException&) + { + // + // Expected if the communicator has been shutdown. + // + } } } catch(const FailureException& ex) |