[omniORB] ORB and POA reinitialization question [Repost]
Vinaya Kavathekar
vinaya@marathontechnologies.com
Tue Sep 3 14:44:01 2002
> -----Original Message-----
> From: Vinaya Kavathekar
> Sent: Wednesday, August 28, 2002 12:10 PM
> To: omniorb-list@realvnc.com
> Subject: ORB and POA reinitialization question.
>
>
> I have a client that must intermittently change servers (connect to system
> A instead of B) upon user request. The easiest way for me to achieve this
> behavior - since it isn't necessary for the client to maintain previous
> state - is to clean up all prior objects and start over as if from the
> start. [The servers use omniINSPOA and persistent object references.]
>
> While changing systems, I issue an orb->shutdown() to clean-up the clients
> current state and then the reinitialization goes through the same process
> as startup.
>
> ORB_init(argCount, argArr, "omniORB3");
> CORBA::Object_var poa_obj =
> orb->resolve_initial_references("RootPOA");
> poa = PortableServer::POA::_narrow(poa_obj);
> CORBA::release(poa);
> PortableServer::POAManager_var pman = poa->the_POAManager();
> pman->activate();
>
> The init call succeeds (after changing orb->destroy() to orb->shutdown(),
> which makes sense) but the call to resolve_initial_references fails with a
> BAD_INV_ORDER.
>
> Question:
> Is it impossible to reinitialize a POA, as the following message
> suggests? If so, how can I achieve the desired effect?
> http://www.realvnc.com/pipermail/omniorb-list/2000-January/004074.html
>
> Thanks,
> Vinaya