[omniORB] Getting a servers root context via initialise_bootstrap_agent
sfurss - Simon Fursse
SFURSS@acxiom.co.uk
Thu, 17 Sep 1998 22:41:35 +0100
Hi
I need to get various objects from different servers within a single
instance of a client application.
Is there anything wrong with using this approach ?
CORBA::Object_ptr getObjectReference(const char *host,int port,const
char *objname)
{
CosNaming::NamingContext_var rootContext;
CORBA::Object_var initServ;
omniInitialReferences::singleton()->set("NameService",CORBA::Object
::_nil());
omniInitialReferences::singleton()->initialise_bootstrap_agent(host,por
t);
initServ = omniInitialReferences::singleton()->get("NameService");
rootContext = CosNaming::NamingContext::_narrow(initServ);
...... etc ...........
This appears to work fine but if there is a proper way of doing it, I'd
rather use that.
If anyones found a neat way of achieving this I'd appreciate any advice.
Thanks
Simon Fursse.