[omniORB] RootPOA and omniINSPOA together

Bailey, Kendall BaileyK at schneider.com
Tue Nov 10 09:49:34 GMT 2009



> -----Original Message-----
> From: omniorb-list-bounces at omniorb-support.com [mailto:omniorb-list-
> bounces at omniorb-support.com] On Behalf Of Urban Purkat
> Sent: Tuesday, November 10, 2009 9:12 AM
> To: Duncan Grisby
> Cc: omniorb-list at omniorb-support.com
> Subject: Re: [omniORB] RootPOA and omniINSPOA together
> 
> 
> But I have to specify the nameservice at the ORB_Init():
> omniORB:   DefaultInitRef (args) = corbaloc:iiop:ivd-test-
> 01.topit.si:2809
> omniORB:   InitRef = NameService=corbaname:iiop:ivd-test-
> 01.topit.si:2809
> 
...
> I have two independent systems (primary and secondary). Each have its
> own NS running.
> I would like to resolve the reference of the other system's servant. So
> since I was not aware that it is possible to use several naming
> services
> (I still do not know how), I thought I can have one servant using a
> persistent object ID and resolve it using corbaloc.
> 
> So if I am able to get the NS object reference that "belobgs" to
> secondary from the primary system I am more than satisfied.
> 
> Regards,
> Urban

The way you've configured the InitRef demonstrates that the NameService
itself is resolvable via a corbaname URI.  So you can have your app
resolve any additional name service via such a URI passed to the  
string_to_object() function.  Once you get the Object reference back,
narrow it to a NamingContext and use it.  The resolve_initial_references()
mechanism is a convenience, but you are free to have your app read
object reference strings ( IOR: or corbaname: or corbaloc: ) in from any other
sources (database, command line, flat file, user input, ... ) and
convert those to CORBA::Object references via the string_to_object() function.

Good luck,
Kendall

 



More information about the omniORB-list mailing list