[Ace-users] Re: [tao-users] Reference to ORB
mitza at ociweb.com
Wed Jun 13 09:11:25 CDT 2007
Vikram Karandikar wrote:
> i have a sample application where in the "int main" mathod i am
> creating ORB by using ORB_init.
> Now that variable is local to "int main", i don't want to make it
> global, but i want to get its reference in some other method say "int
> In my previous ORB they were having CORBA::ORB::_duplicate () to
> return reference to the global ORB. But TAO does not have _duplicate
> with no parameters, means we have to pass ORB reference to be duplicated.
> Is there any way to have this work?
If you use the third parameter to ORB_init() to give the ORB a name,
subsequent calls to ORB_init() using that same name will return a
reference to that ORB (and will ignore argc and argv if I recall
correctly). I think this will work with "" as the name too (which is
Object Computing, Inc.
More information about the Ace-users