[omniORB] Is resolve_initial_references() implemented right?

Renzo Tomaselli renzo.tomaselli@tecnotp.it
Fri, 21 Dec 2001 10:53:53 +0100


>> I want to be able to start one executable, which loads depending on a
>> configuration file different DLL's.
>> Each of those DLL's will load his own instance of the omniORB library.
>
>Why?  Why not make them share a single version of the omniORB library?
>What advantage is there in trying to give each DLL its own version of
>omniORB?


Unless I missed the point of discussion, this is wrong. There cannot be
multiples copies of the same dll loaded into the same process and this
cannot be overridden. Windows kernel keeps a ref counter for each of them,
so that physical loading/unloading occurs only once. Furthermore this is
true even for different processes. The difference is that for a single
process the data space is shared as well, no matter how a specific dll has
been loaded.
So when multiple dlls in a process link to OmniORB dlls, there is *one* orb
and one copy of related data for the whole process. This in turn means that
such ORB must be truly initialized once by ORB_init in a process-wide
manner; further calls just return the existing ORB, no matter whether they
occur within a dll or not.
Cheers,
                                             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
---------------------------------------------------------------------------