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/AdapterCache.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/AdapterCache.cpp')
-rw-r--r-- | cpp/src/IceGrid/AdapterCache.cpp | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/cpp/src/IceGrid/AdapterCache.cpp b/cpp/src/IceGrid/AdapterCache.cpp index b210c858aae..5eeae0f1edf 100644 --- a/cpp/src/IceGrid/AdapterCache.cpp +++ b/cpp/src/IceGrid/AdapterCache.cpp @@ -112,30 +112,6 @@ AdapterCache::get(const string& id) const return entry; } -ServerAdapterEntryPtr -AdapterCache::getServerAdapter(const string& id) const -{ - Lock sync(*this); - ServerAdapterEntryPtr svrEntry = ServerAdapterEntryPtr::dynamicCast(getImpl(id)); - if(!svrEntry) - { - throw AdapterNotExistException(id); - } - return svrEntry; -} - -ReplicaGroupEntryPtr -AdapterCache::getReplicaGroup(const string& id) const -{ - Lock sync(*this); - ReplicaGroupEntryPtr repEntry = ReplicaGroupEntryPtr::dynamicCast(getImpl(id)); - if(!repEntry) - { - throw AdapterNotExistException(id); - } - return repEntry; -} - void AdapterCache::removeServerAdapter(const string& id) { @@ -227,12 +203,13 @@ ServerAdapterEntry::getProxies(int& nReplicas, bool& replicaGroup) vector<pair<string, AdapterPrx> > adapters; nReplicas = 1; replicaGroup = false; + // // COMPILEFIX: We need to use a temporary here to work around a // compiler bug with xlC on AIX which causes a segfault if // getProxy raises an exception. // - AdapterPrx adpt = getProxy("", true); + AdapterPrx adpt = getProxy(); adapters.push_back(make_pair(_id, adpt)); return adapters; } @@ -271,7 +248,7 @@ ServerAdapterEntry::getAdapterInfo() const info.replicaGroupId = _replicaGroupId; try { - info.proxy = getProxy("", true)->getDirectProxy(); + info.proxy = getProxy()->getDirectProxy(); } catch(const Ice::Exception&) { @@ -290,7 +267,7 @@ ServerAdapterEntry::getProxy(const string& replicaGroupId, bool upToDate) const } else { - if(_replicaGroupId != replicaGroupId) + if(_replicaGroupId != replicaGroupId) // Validate the replica group. { throw Ice::InvalidReplicaGroupIdException(); } @@ -448,7 +425,7 @@ ReplicaGroupEntry::getProxies(int& nReplicas, bool& replicaGroup) // compiler bug with xlC on AIX which causes a segfault if // getProxy raises an exception. // - AdapterPrx adpt = (*p)->getProxy(_id, true); + AdapterPrx adpt = (*p)->getProxy(_id); adapters.push_back(make_pair((*p)->getId(), adpt)); } catch(const AdapterNotExistException&) @@ -460,6 +437,9 @@ ReplicaGroupEntry::getProxies(int& nReplicas, bool& replicaGroup) catch(const NodeUnreachableException&) { } + catch(const DeploymentException&) + { + } } return adapters; |