diff options
author | Benoit Foucher <benoit@zeroc.com> | 2006-07-21 14:30:52 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2006-07-21 14:30:52 +0000 |
commit | 2379dcbd554ab5c1aac616b5585c99e3d742305e (patch) | |
tree | b674e53966fba682aa1008855a26721bd910e023 /cpp/src/IceGrid/AdminI.cpp | |
parent | Optimized context to avoid copies (diff) | |
download | ice-2379dcbd554ab5c1aac616b5585c99e3d742305e.tar.bz2 ice-2379dcbd554ab5c1aac616b5585c99e3d742305e.tar.xz ice-2379dcbd554ab5c1aac616b5585c99e3d742305e.zip |
Initial implementation of the IceGrid registry replication.
Diffstat (limited to 'cpp/src/IceGrid/AdminI.cpp')
-rw-r--r-- | cpp/src/IceGrid/AdminI.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cpp/src/IceGrid/AdminI.cpp b/cpp/src/IceGrid/AdminI.cpp index f1e07dee4b4..f5c7586745c 100644 --- a/cpp/src/IceGrid/AdminI.cpp +++ b/cpp/src/IceGrid/AdminI.cpp @@ -637,8 +637,15 @@ AdminI::updateObject(const Ice::ObjectPrx& proxy, const ::Ice::Current& current) } void -AdminI::addObjectWithType(const Ice::ObjectPrx& proxy, const string& type, const ::Ice::Current&) +AdminI::addObjectWithType(const Ice::ObjectPrx& proxy, const string& type, const ::Ice::Current& current) { + const Ice::Identity id = proxy->ice_getIdentity(); + if(id.category == _database->getInstanceName()) + { + throw DeploymentException("adding object `" + current.adapter->getCommunicator()->identityToString(id) + + "' is not allowed"); + } + ObjectInfo info; info.proxy = proxy; info.type = type; |