summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/AdminI.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-07-21 14:30:52 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-07-21 14:30:52 +0000
commit2379dcbd554ab5c1aac616b5585c99e3d742305e (patch)
treeb674e53966fba682aa1008855a26721bd910e023 /cpp/src/IceGrid/AdminI.cpp
parentOptimized context to avoid copies (diff)
downloadice-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.cpp9
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;