summaryrefslogtreecommitdiff
path: root/cpp/src/IcePack/NodeRegistryI.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2005-01-27 14:09:35 +0000
committerBenoit Foucher <benoit@zeroc.com>2005-01-27 14:09:35 +0000
commit9b9bd3568a59a4b111953bc016a9bcdf08ca728c (patch)
treec644accf965ae25c0c4f8d318a5a19500d36f38a /cpp/src/IcePack/NodeRegistryI.cpp
parentConnection validation now checks for Ice.Override.ConnectTimeout (diff)
downloadice-9b9bd3568a59a4b111953bc016a9bcdf08ca728c.tar.bz2
ice-9b9bd3568a59a4b111953bc016a9bcdf08ca728c.tar.xz
ice-9b9bd3568a59a4b111953bc016a9bcdf08ca728c.zip
Added 'object list' and 'object describe' IcePack admin commands.
Diffstat (limited to 'cpp/src/IcePack/NodeRegistryI.cpp')
-rw-r--r--cpp/src/IcePack/NodeRegistryI.cpp46
1 files changed, 24 insertions, 22 deletions
diff --git a/cpp/src/IcePack/NodeRegistryI.cpp b/cpp/src/IcePack/NodeRegistryI.cpp
index b75fb2290d0..63b8dec540c 100644
--- a/cpp/src/IcePack/NodeRegistryI.cpp
+++ b/cpp/src/IcePack/NodeRegistryI.cpp
@@ -101,42 +101,44 @@ NodeRegistryI::add(const string& name, const NodePrx& node, const Ice::Current&
break;
}
- AdapterPrx adapter;
- while(!adapter)
+ //
+ // Set the direct proxy of the node object adapter.
+ //
+ while(true)
{
try
{
- adapter = _adapterRegistry->findById("IcePack.Node." + name);
-
//
// TODO: ensure this adapter has been created by the adapter factory. It's possible that an
// adapter has been created with the same name. In such a case, the best is probably to
// prevent the node registration by throwing an appropriate exception. The user would then
// need to remove the adapter from the adapter registry to be able to run the node.
//
+
+ AdapterPrx adapter = _adapterRegistry->findById("IcePack.Node." + name);
+ adapter->setDirectProxy(node);
+ return;
}
catch(const AdapterNotExistException&)
{
- //
- // Create and register the node adapter.
- //
- adapter = _adapterFactory->createStandaloneAdapter("IcePackNodeAdapter." + name);
- try
- {
- _adapterRegistry->add("IcePack.Node." + name, adapter);
- }
- catch(const AdapterExistsException&)
- {
- adapter->destroy();
- adapter = 0;
- }
}
- }
+ catch(const Ice::ObjectNotExistException&)
+ {
+ }
- //
- // Set the direct proxy of the node object adapter.
- //
- adapter->setDirectProxy(node);
+ //
+ // Create and register the node adapter.
+ //
+ AdapterPrx adapter = _adapterFactory->createStandaloneAdapter("IcePackNodeAdapter." + name);
+ try
+ {
+ _adapterRegistry->add("IcePack.Node." + name, adapter);
+ }
+ catch(const AdapterExistsException&)
+ {
+ adapter->destroy();
+ }
+ }
}
void