summaryrefslogtreecommitdiff
path: root/cpp/src/IceGrid/AdminSessionI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceGrid/AdminSessionI.cpp')
-rw-r--r--cpp/src/IceGrid/AdminSessionI.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/cpp/src/IceGrid/AdminSessionI.cpp b/cpp/src/IceGrid/AdminSessionI.cpp
index df4f2029657..4bf2c08e78a 100644
--- a/cpp/src/IceGrid/AdminSessionI.cpp
+++ b/cpp/src/IceGrid/AdminSessionI.cpp
@@ -73,7 +73,21 @@ AdminSessionI::_register(const SessionServantManagerPtr& servantManager, const I
// This is supposed to be called after creation only, no need to synchronize.
//
_servantManager = servantManager;
- Ice::ObjectPrx session = _servantManager->addSession(this, con, true);
+
+ string category = "";
+
+ if(con != 0)
+ {
+ category = _database->getInstanceName() + "-" + IceUtil::generateUUID();
+
+ Ice::Identity templateId;
+ templateId.name = "pick-a-name";
+ templateId.category = category;
+
+ _adminCallbackTemplate = _registry->createAdminCallbackProxy(templateId);
+ }
+
+ Ice::ObjectPrx session = _servantManager->addSession(this, con, category);
_admin = AdminPrx::uncheckedCast(_servantManager->add(new AdminI(_database, _registry, this), this));
@@ -86,6 +100,12 @@ AdminSessionI::getAdmin(const Ice::Current& current) const
return _admin;
}
+Ice::ObjectPrx
+AdminSessionI::getAdminCallbackTemplate(const Ice::Current& current) const
+{
+ return _adminCallbackTemplate;
+}
+
void
AdminSessionI::setObservers(const RegistryObserverPrx& registryObserver,
const NodeObserverPrx& nodeObserver,