diff options
author | Benoit Foucher <benoit@zeroc.com> | 2006-11-23 14:44:51 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2006-11-23 14:44:51 +0000 |
commit | ad476fdda5c9a9f23b9e65fc3c4b3016f7704848 (patch) | |
tree | 329b46efefd33095fe3ed8dc92ef3d8726cd0857 /cpp/src/IceGrid/AdminSessionI.cpp | |
parent | Remove deprecated methods (diff) | |
download | ice-ad476fdda5c9a9f23b9e65fc3c4b3016f7704848.tar.bz2 ice-ad476fdda5c9a9f23b9e65fc3c4b3016f7704848.tar.xz ice-ad476fdda5c9a9f23b9e65fc3c4b3016f7704848.zip |
Code cleanup and fixed startup scalability issue of the registry (it no
longer contacts all the nodes).
Diffstat (limited to 'cpp/src/IceGrid/AdminSessionI.cpp')
-rw-r--r-- | cpp/src/IceGrid/AdminSessionI.cpp | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/cpp/src/IceGrid/AdminSessionI.cpp b/cpp/src/IceGrid/AdminSessionI.cpp index 5fe3f014d5f..db49207138d 100644 --- a/cpp/src/IceGrid/AdminSessionI.cpp +++ b/cpp/src/IceGrid/AdminSessionI.cpp @@ -219,44 +219,14 @@ AdminSessionI::openNodeStdErr(const std::string& name, const Ice::Current& curre FileIteratorPrx AdminSessionI::openRegistryStdOut(const std::string& name, const Ice::Current& current) { - FileReaderPrx reader; - if(name == _replicaName) - { - Ice::Identity internalRegistryId; - internalRegistryId.category = _database->getInstanceName(); - internalRegistryId.name = "InternalRegistry-" + _replicaName; - - Ice::CommunicatorPtr communicator = current.adapter->getCommunicator(); - string proxyStr = communicator->identityToString(internalRegistryId); - reader = FileReaderPrx::uncheckedCast(communicator->stringToProxy(proxyStr)); - } - else - { - reader = _database->getReplica(name); - } - + FileReaderPrx reader = name == _replicaName ? _database->getInternalRegistry() : _database->getReplica(name); return addFileIterator(reader, "stdout", current); } FileIteratorPrx AdminSessionI::openRegistryStdErr(const std::string& name, const Ice::Current& current) { - FileReaderPrx reader; - if(name == _replicaName) - { - Ice::Identity internalRegistryId; - internalRegistryId.category = _database->getInstanceName(); - internalRegistryId.name = "InternalRegistry-" + _replicaName; - - Ice::CommunicatorPtr communicator = current.adapter->getCommunicator(); - string proxyStr = communicator->identityToString(internalRegistryId); - reader = FileReaderPrx::uncheckedCast(communicator->stringToProxy(proxyStr)); - } - else - { - reader = _database->getReplica(name); - } - + FileReaderPrx reader = name == _replicaName ? _database->getInternalRegistry() : _database->getReplica(name); return addFileIterator(reader, "stderr", current); } |