diff options
author | Benoit Foucher <benoit@zeroc.com> | 2006-11-28 08:45:49 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2006-11-28 08:45:49 +0000 |
commit | 2e0de9a67c384bc2b7379dfb373d40521c64ff2b (patch) | |
tree | c5aa33b0706a8ae30b4c9e82fd7f59dcb6360cff /cpp/src/IceGrid/ReplicaSessionManager.cpp | |
parent | Changed param name (diff) | |
download | ice-2e0de9a67c384bc2b7379dfb373d40521c64ff2b.tar.bz2 ice-2e0de9a67c384bc2b7379dfb373d40521c64ff2b.tar.xz ice-2e0de9a67c384bc2b7379dfb373d40521c64ff2b.zip |
Cleanup
Diffstat (limited to 'cpp/src/IceGrid/ReplicaSessionManager.cpp')
-rw-r--r-- | cpp/src/IceGrid/ReplicaSessionManager.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/cpp/src/IceGrid/ReplicaSessionManager.cpp b/cpp/src/IceGrid/ReplicaSessionManager.cpp index cabd6ef264a..31802da355c 100644 --- a/cpp/src/IceGrid/ReplicaSessionManager.cpp +++ b/cpp/src/IceGrid/ReplicaSessionManager.cpp @@ -107,7 +107,11 @@ public: adapterAdded(const AdapterInfo& info, const Ice::Current& current) { string failure; - if(!_database->setAdapterDirectProxy(info.id, info.replicaGroupId, info.proxy)) + try + { + _database->setAdapterDirectProxy(info.id, info.replicaGroupId, info.proxy); + } + catch(const AdapterExistsException&) { failure = "adapter `" + info.id + "' already exists and belongs to an application"; } @@ -118,7 +122,11 @@ public: adapterUpdated(const AdapterInfo& info, const Ice::Current& current) { string failure; - if(!_database->setAdapterDirectProxy(info.id, info.replicaGroupId, info.proxy)) + try + { + _database->setAdapterDirectProxy(info.id, info.replicaGroupId, info.proxy); + } + catch(const AdapterExistsException&) { failure = "adapter `" + info.id + "' already exists and belongs to an application"; } @@ -129,7 +137,11 @@ public: adapterRemoved(const std::string& id, const Ice::Current& current) { string failure; - if(!_database->setAdapterDirectProxy(id, "", 0)) + try + { + _database->setAdapterDirectProxy(id, "", 0); + } + catch(const AdapterExistsException&) { failure = "adapter `" + id + "' already exists and belongs to an application"; } @@ -263,7 +275,6 @@ ReplicaSessionManager::create(const string& name, Ice::Identity id; id.category = comm->getDefaultLocator()->ice_getIdentity().category; id.name = "InternalRegistry-Master"; - _master = InternalRegistryPrx::uncheckedCast(comm->stringToProxy(comm->identityToString(id))); _name = name; @@ -471,7 +482,7 @@ ReplicaSessionManager::createSession(InternalRegistryPrx& registry, IceUtil::Tim { exception.reset(ex.ice_clone()); } - + if(session) { // |