[omniORB] omniInitializer

Renzo Tomaselli renzo.tomaselli@tecnotp.it
Thu, 12 Jul 2001 14:31:48 +0200


Hi all,
    it happens that an implementation packaged inside a dll behaves
improperly when the dll is unloaded without any explicit orb shutdown call.
This is the case when the dll is part of an ActiveX and this is taken away
by Windows as a consequence of answering yes to canUnloadNow.
Placing a global object destructor doesn't help, since this is in a race
with OmniORB initialisers destructors and no compiler offers specific
destruction ordering here.
So it occurs that the such destructor finds the orb still alive, while all
internal threads have been already killed. In such a situation a deadlock is
guaranteed, e.i. when deactivating some objects.
The question is: is there anything we can use to detect when threads have
gone ? E.i. can we use the undocumented omniInitializer::install() method to
install a specific initializer which detach() method triggers a final
cleanup ?
Thanks,
                                             Renzo Tomaselli
---------------------------------------------------------------------------
TecnoTP s.n.c. Special Information System Design
Maso Pelauchi I38050 Ronchi Valsugana,  Trento TN  ITALY
Tel. +39 0461 773164      Fax. +39 0461 771514
e-mail: renzo.tomaselli@tecnotp.it
---------------------------------------------------------------------------