[Ace-users] Re: [tao-users] Reference to ORB

Douglas C. Schmidt schmidt at dre.vanderbilt.edu
Wed Jun 13 05:49:06 CDT 2007

Hi Vikram,

As always, to ensure that we have proper version/platform/compiler
information, please make sure you fill out the appropriate problem
report form (PRF), which is in


or in


in older versions of ACE+TAO.  Make sure to include this information
when asking any questions about ACE+TAO since otherwise we have to
"guess" what version/platform/compiler/options you've using, which is
very error-prone and slows down our responsiveness.  If you don't use
the PRF, therefore, it is less likely that someone from the core
ACE+TAO developer team will be able to answer your question.
Naturally, we encourage and appreciate other members of the ACE+TAO
user community who can respond to questions that they have the answers

>    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 xyz".


>    In my previous ORB they were having CORBA::ORB::_duplicate () to return
>reference to the global ORB. 

That is non-standard behavior.

>But TAO does not have _duplicate with no
>parameters, means we have to pass ORB reference to be duplicated.

Right, that is standard behavior.

>    Is there any way to have this work?

Sure - either

. Pass the (duplicated) ORB as a parameter to int xyz()

. Create a singleton called MySingletonORB and use this everywhere.

take care,

Dr. Douglas C. Schmidt                       Professor and Associate Chair
Electrical Engineering and Computer Science  TEL: (615) 343-8197
Vanderbilt University                        WEB: www.dre.vanderbilt.edu/~schmidt
Nashville, TN 37203                          NET: d.schmidt at vanderbilt.edu

More information about the Ace-users mailing list