[omniORB] about make a servant both CORBA client and CORBA server
Fri Jul 5 16:39:00 2002
Thanks for your help. Yes it can use only one ORB. I
am sorry for one error where I declare the orb twice!
The CORBA specification said :"The ORB_init operation
may be called any number of times and shall return the
same ORB reference when the same ORBid string is
passed." So if we call more than one ORB_init(), it
will return the same orb.That is why you say it should
use only one ORB? And that is why when I
shutdown/destroy orb2 the program will crash.
--- Luke Deller <firstname.lastname@example.org> wrote:
> Hi Shifeng,
> Yes, you can (and should) use only one ORB. You say
> this does not work for
> you... what problems did you have?
> zhang ji wrote:
> > I have a problem on how to make a servant as both
> > CORBA client and CORBA server.
> > I published one servant a as CORBA object A,
> > the publish program I init one ORB orb1 and make
> > orb1->run(); in one function of the servant a , I
> > to call another CORBA object. In this functin I
> > another ORB orb2, by using
> > I access another CORBA object, but I can not
> > the orb2 or destroy it after finishing the remote
> > in the function.
> > If I orb2->shutdown, it seems the whole CORBA
> object A
> > will also be destroied after the calling.
> > If I orb2->destroy, the client will block there.
> > But when I either call the orb2->shutdown or call
> > orb2->destroy, it works well.
> > So do I really need not to call the shutdown or
> > destroy? And Can I use one ORB only (such as only
> > orb1, I tried but it does not work)?
> > Thanks,
> > Shifeng
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free