summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/RegistryI.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-09-06 15:39:41 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-09-06 15:39:41 +0000
commit6f46bb760b30ef883b386dfa8e695c8d5004f05f (patch)
treec3dabd2d404b72a8e4ad16996a913ceee963815e /cpp/src/IceGrid/RegistryI.cpp
parentFixed bug 1209 (diff)
downloadice-6f46bb760b30ef883b386dfa8e695c8d5004f05f.tar.bz2
ice-6f46bb760b30ef883b386dfa8e695c8d5004f05f.tar.xz
ice-6f46bb760b30ef883b386dfa8e695c8d5004f05f.zip
The master now waits for the replicas to be updated before to return.
Added support for dynamic registration of adapters in the replicas.
Diffstat (limited to 'cpp/src/IceGrid/RegistryI.cpp')
-rw-r--r--cpp/src/IceGrid/RegistryI.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/cpp/src/IceGrid/RegistryI.cpp b/cpp/src/IceGrid/RegistryI.cpp
index 6359083694d..0a477b41d91 100644
--- a/cpp/src/IceGrid/RegistryI.cpp
+++ b/cpp/src/IceGrid/RegistryI.cpp
@@ -351,21 +351,20 @@ RegistryI::setupLocator(const Ice::ObjectAdapterPtr& clientAdapter,
//
// Create the locator registry and locator interfaces.
//
- bool dynamicReg = _communicator->getProperties()->getPropertyAsInt("IceGrid.Registry.DynamicRegistration") > 0;
- Identity locatorRegistryId;
- locatorRegistryId.category = _instanceName;
- locatorRegistryId.name = IceUtil::generateUUID();
- ObjectPrx regPrx = serverAdapter->add(new LocatorRegistryI(_database, dynamicReg), locatorRegistryId);
+ bool dynReg = _communicator->getProperties()->getPropertyAsInt("IceGrid.Registry.DynamicRegistration") > 0;
+ Identity locatorRegId;
+ locatorRegId.category = _instanceName;
+ locatorRegId.name = IceUtil::generateUUID();
+ ObjectPrx obj = serverAdapter->add(new LocatorRegistryI(_database, dynReg, _master, _session), locatorRegId);
+ Ice::LocatorRegistryPrx locatorRegistry = LocatorRegistryPrx::uncheckedCast(obj);
Identity locatorId;
locatorId.category = _instanceName;
locatorId.name = "Locator";
- clientAdapter->add(new LocatorI(_communicator, _database, LocatorRegistryPrx::uncheckedCast(regPrx)), locatorId);
-
- return LocatorPrx::uncheckedCast(registryAdapter->addWithUUID(
- new LocatorI(_communicator,
- _database,
- LocatorRegistryPrx::uncheckedCast(regPrx))));
+ clientAdapter->add(new LocatorI(_communicator, _database, locatorRegistry), locatorId);
+
+ obj = registryAdapter->addWithUUID(new LocatorI(_communicator, _database, locatorRegistry));
+ return LocatorPrx::uncheckedCast(obj);
}
void