[omniORB] using dlopen() to make a dynamicly loadable implementations

Favre Benoit ben.favre@wanadoo.fr
Thu Jul 11 15:02:02 2002


Hello,
I am using omniORB 3.05 on Linux 2.4.18 redhat 7.2 and i am trying to 
dynamicly load object implementations using the dlopen, dlsyn, dlclose family 
functions.

When a new object is needed, i load the shared library using dlopen() and get 
a "maker" function from it with dlsym(). This "maker" only returns a new 
object of my implementation class.
When the object is not needed anymore, i call CORBA::release() on the 
implementation instance to get rid of it and unload the library with 
dlclose().
This works fine for one instanciation, but if i do it twice, (ie. 
create,distroy,create,destroy), the program will dump a core on the call of 
CORBA::release() or on bind() if i use the name service.
I read the following post :
http://www.realvnc.com/pipermail/omniorb-list/2000-November/016536.html
and wondered if the bug described was a real one and if it had been fixed.

My implementation of the dynamic behaviour is based on this post :
http://www.realvnc.com/pipermail/omniorb-list/1999-January/012082.html
but using a POA instead of a BOA.

If someone have experienced this kind of problem and have a clue, please help 
me.

thanx, Benoit Favre
ben.favre@wanadoo.fr