diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/Exception.cpp | 6 | ||||
-rw-r--r-- | cpp/src/Ice/ObjectAdapterI.cpp | 8 | ||||
-rw-r--r-- | cpp/src/IcePack/LocatorRegistryI.cpp | 2 | ||||
-rw-r--r-- | cpp/src/IcePack/Makefile | 2 | ||||
-rw-r--r-- | cpp/src/IcePack/ServerBuilder.cpp | 3 |
5 files changed, 14 insertions, 7 deletions
diff --git a/cpp/src/Ice/Exception.cpp b/cpp/src/Ice/Exception.cpp index baa65868bf0..50000547540 100644 --- a/cpp/src/Ice/Exception.cpp +++ b/cpp/src/Ice/Exception.cpp @@ -75,17 +75,17 @@ Ice::ObjectAdapterDeactivatedException::ice_print(ostream& out) const } void -Ice::ObjectAdapterActiveException::ice_print(ostream& out) const +Ice::ObjectAdapterNameInUseException::ice_print(ostream& out) const { Exception::ice_print(out); - out << ":\nobject adapter already active"; + out << ":\nobject adapter name `" << name << "' already in use"; } void Ice::ObjectAdapterNotRegisteredException::ice_print(ostream& out) const { Exception::ice_print(out); - out << ":\nobject adapter not registered with the locator"; + out << ":\nobject adapter `" << name << "' not registered with the locator"; } void diff --git a/cpp/src/Ice/ObjectAdapterI.cpp b/cpp/src/Ice/ObjectAdapterI.cpp index 0089e105b31..55269d7bba5 100644 --- a/cpp/src/Ice/ObjectAdapterI.cpp +++ b/cpp/src/Ice/ObjectAdapterI.cpp @@ -84,11 +84,15 @@ Ice::ObjectAdapterI::activate() } catch(const Ice::AdapterNotRegistered&) { - throw ObjectAdapterNotRegisteredException(__FILE__, __LINE__); + ObjectAdapterNotRegisteredException ex(__FILE__, __LINE__); + ex.name = _name; + throw ex; } catch(const Ice::AdapterAlreadyActive&) { - throw ObjectAdapterActiveException(__FILE__, __LINE__); + ObjectAdapterNameInUseException ex(__FILE__, __LINE__); + ex.name = _name; + throw ex; } } } diff --git a/cpp/src/IcePack/LocatorRegistryI.cpp b/cpp/src/IcePack/LocatorRegistryI.cpp index 78cfaece9bf..02980af4b70 100644 --- a/cpp/src/IcePack/LocatorRegistryI.cpp +++ b/cpp/src/IcePack/LocatorRegistryI.cpp @@ -78,7 +78,7 @@ IcePack::LocatorRegistryI::setAdapterDirectProxy(const string& name, const Ice:: // IcePack deployment mechanism). // Ice::PropertiesPtr properties = _adapter->getCommunicator()->getProperties(); - if(properties->getPropertyAsInt("IcePack.Registry.AllowUnregisteredAdapters") > 0) + if(properties->getPropertyAsInt("IcePack.Registry.DynamicRegistration") > 0) { AdapterPrx adapter = AdapterPrx::uncheckedCast(_adapter->addWithUUID(new StandaloneAdapterI())); try diff --git a/cpp/src/IcePack/Makefile b/cpp/src/IcePack/Makefile index d1f3acf1784..297199b6467 100644 --- a/cpp/src/IcePack/Makefile +++ b/cpp/src/IcePack/Makefile @@ -83,7 +83,7 @@ LOCAL_HDIR = ../IcePack SDIR = $(slicedir)/IcePack SLICE2CPPFLAGS = -I.. -I$(slicedir) SLICECMD = $(SLICE2CPP) --ice --include-dir IcePack --dll-export ICE_PACK_API $(SLICE2CPPFLAGS) -SLICE2FREEZECMD = $(SLICE2FREEZE) --ice --binary --include-dir IcePack -I.. -I$(slicedir) +SLICE2FREEZECMD = $(SLICE2FREEZE) --ice --include-dir IcePack -I.. -I$(slicedir) include $(top_srcdir)/config/Make.rules CPPFLAGS := -I.. $(CPPFLAGS) $(XERCESC_FLAGS) diff --git a/cpp/src/IcePack/ServerBuilder.cpp b/cpp/src/IcePack/ServerBuilder.cpp index 9fbdac41272..029c356954b 100644 --- a/cpp/src/IcePack/ServerBuilder.cpp +++ b/cpp/src/IcePack/ServerBuilder.cpp @@ -544,6 +544,9 @@ IcePack::ServerBuilder::registerAdapter(const string& name, const string& endpoi _serverAdapterNames.push_back(name); _tasks.push_back(new RegisterServerAdapterTask(adapterRegistry, name, *this)); + addProperty("Ice.Adapter." + name + ".Locator", + _nodeInfo->getCommunicator()->getProperties()->getProperty("Ice.Default.Locator")); + if(!endpoints.empty()) { addProperty("Ice.Adapter." + name + ".Endpoints", endpoints); |