[omniORB] ORB and POA reinitialization question.
Duncan Grisby
duncan@grisby.org
Tue Sep 3 15:31:02 2002
On Wednesday 28 August, Vinaya Kavathekar wrote:
> 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.]
I don't think this is a particularly good idea. Why not just have the
code for the client to change servers?
> 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.
[...]
> 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.
In omniORB 3, you cannot start things up again after shutting them
down. It's impossible. In omniORB 4, you can do it, provided you do
orb->destroy() before ORB_init() again, but it's not normally a good
idea.
Cheers,
uncan.
--
-- Duncan Grisby --
-- duncan@grisby.org --
-- http://www.grisby.org --