[omniORB] deferred object deactivation
Duncan Grisby
dgrisby@uk.research.att.com
Fri, 29 Jun 2001 15:02:45 +0100
On Monday 25 June, "Renzo Tomaselli" wrote:
> after porting a multicomponent architecture from v2.8 to 3.04 (win32
> platform, MSVC 6.0), I noticed that servant deactivation when a servant
> activator is involved occurs in a deferred way since
> omniOrbPOA::deactivate_object() places the servant onto a queue, even if
> that servant is not busy.
> If such a servant is located into a dll which is about to be unloaded when
> deactivate_object is called (e.i. from a global destructor), the final
> result is that method etherealize of the activator is called too late and an
> exception occurs since the dll is gone and servant is dead.
> That queue (see omniOrbPOA::add_object_to_etherealisation_queue) is an
> OmniORB internal tool so that I don't know how to wait for it to flush in
> order to safely unload the container dll.
If you create a POA specifically for the servant, then you can destroy
the POA, with etherialize_objects and wait_for_completion arguments
set true. That will wait until the servant is definitely deactivated.
Cheers,
Duncan.
--
-- Duncan Grisby \ Research Engineer --
-- AT&T Laboratories Cambridge --
-- http://www.uk.research.att.com/~dpg1 --