[omniORB] simple question
Duncan Grisby
dgrisby@uk.research.att.com
Mon, 22 Oct 2001 11:08:43 +0100
On Monday 22 October, "zhangzq71" wrote:
> CORBA::Object_var obj = orb->string_to_object(IORstring);
> mynamespace::myobj_var myobjref = myobj::_narrow(obj);
>
> now if the IORstring changed(eg, the servant was changed to another IP),
> and do not want to declare more mynamespace::myobj_var variable, just
> use myobjref, how can I do?
>
> IORString = anotherIORString;
> obj = orb->string_to_object(IORString);
> (what should I do here?)
> myobjref = myobj::_narrow(obj);
Yes, of course. If you are unsure about this sort of thing (or even if
you're not :-), I recommend you get "Advanced CORBA Programming with
C++" by Henning and Vinoski. It explains how all these things work.
Cheers,
Duncan.
--
-- Duncan Grisby \ Research Engineer --
-- AT&T Laboratories Cambridge --
-- http://www.uk.research.att.com/~dpg1 --