[omniORB] Is resolve_initial_references() implemented right?

Jaap de Wolff wolff@NewBridges.nl
Thu, 20 Dec 2001 12:34:44 +0100


I am linking to two instances of the omniORB library.
(Or in fact I am linking to even five instances of the omniORB library)
This is by design:
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.

To make it even more complicated for non windows programmers, the executable
is an NT Service.
For me there are adavtages on this way of working:
I use on one machine only one ORB for all services, which is faster.
For all our CORBA services, we use only one NT service, which is easy for
our customers.

At this moment I already have a solution for this particular problem:
I just made a class GlobalFunctions in my executable, and placed the
resolve_initial_reference in there.

But still other problems arise:

The tracelevel is also global etc..

Also I do not think it is specific to windows, I think that when I port this
program to linux, I still will have the same problem.

If you are interested in it, I will try to make a linux CORBA service, with
the same kind of problem. But that will take a while...


> -----Original Message-----
> From:	Duncan Grisby [SMTP:dgrisby@uk.research.att.com]
> Sent:	Thursday, December 20, 2001 11:46 AM
> To:	Jaap de Wolff
> Cc:	Omniorb-List (E-mail)
> Subject:	Re: [omniORB] Is resolve_initial_references() implemented
> right? 
> 
> On Friday 14 December, Jaap de Wolff wrote:
> 
> > When creating orb = CORBA::ORB_init() from the NTService, and then load
> a
> > DLL (let's say CorbaDLL), then the call from CorbaDLL
> > orb->resolve_initial_reference() let crash the system.
> > This is because from CorbaDLL in the file omniInternal.cc the
> > omni::internalLock is a NULL pointer.
> 
> This sort of thing should work. omniORB is littered with the ugliness
> that Windows requires to properly export these things from DLLs.
> Perhaps you are managing to link two instances of the omniORB library
> into the same process?
> 
> Does anyone have more experience with DLLs on Windows?
> 
> Cheers,
> 
> Duncan.
> 
> -- 
>  -- Duncan Grisby  \  Research Engineer  --
>   -- AT&T Laboratories Cambridge          --
>    -- http://www.uk.research.att.com/~dpg1 --