[omniORB] about make a servant both CORBA client and CORBA server

Luke Deller ldeller@xplantechnology.com
Fri Jul 5 04:51:01 2002


Hi Shifeng,

Yes, you can (and should) use only one ORB.  You say this does not work for 
you... what problems did you have?

Regards,
Luke.

zhang ji wrote:
> I have a problem on how to make a servant as both a
> CORBA client and CORBA server.
> 
> I published one servant a as CORBA object A, within
> the publish program I init one ORB orb1 and make it
> orb1->run(); in one function of the servant a , I need
> to call another CORBA object. In this functin I init
> another ORB orb2, by using orb2->string_to_object(ref)
> I access another CORBA object, but I can not shutdown
> the orb2 or destroy it after finishing the remote call
> 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 the
> 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