[omniORB] deleting active servants

Pánczél Levente Levente.Panczel at compuworx.hu
Mon Jan 5 16:17:31 GMT 2004


Hi

I think I get it.
So you suggest me to make a class OwnRefCountServantBase, wich then cares for dlclose() in _remove_ref().
Let's say I define this class in orcsb.h and implement _add_ref() and _remove_ref() in orcsb.cpp
I compile these two sources to orcsb.o
I link the server application (wich dynamically loads shared objects, and commands them to create TTerminalObject servant instances) with orcsb.o
In TermObj.h I #include orcsb.h and may inherit TTerminalObject from OwnRefCountServantBase like:
	Class TTerminalObject: public OwnRefCountServantBase, ...
And than I can link build the shared object without to have it linked with orcsb.o and without having it containing orcsb.cpp? And so when the TTeminalObect implementation references ie. OwnRefCountBase::DoAnything() then DoAnything is looked up in the server application by the dynamic link established through dlopen. (So this means, that dlopening a file is not a one-way link, but it also imports the clients symbols to be available by the shared object's code?) That would really be a difference compared to windows...
Meanwhile, I will do a test to see if this really works.
Thanks for the advice! I'll let you know what I get.
Cheers,
Panczel, Levente

-----Original Message-----
From: baileyk at schneider.com [mailto:baileyk at schneider.com] 
Sent: Monday, January 05, 2004 3:38 PM
To: Pánczél Levente
Cc: OmniORB support
Subject: RE: [omniORB] deleting active servants



Just because you want to unload your servant class implementations, does
not mean you need to unload all base classes upon which your servant
classes depend.  I've suggested a new mixin class to replace
RefCountServantBase (which is never unloaded unless somehow you unload all
of omniORB).  That's all.  I haven't seen any argument that shows why that
won't work for you.

Good luck,
Kendall




                                                                                                                          
                      Pánczél Levente                                                                                     
                      <Levente.Panczel at co        To:       <baileyk at schneider.com>, "OmniORB support"                     
                      mpuworx.hu>                 <omniorb-list at omniorb-support.com>                                      
                                                 cc:                                                                      
                      01/05/2004 07:13 AM        Fax to:                                                                  
                                                 Subject:  RE: [omniORB] deleting active servants                         
                                                                                                                          




Hi again

I think we're just about to get to the point:
Kendall, you said
"You cut off the quote.  I said it should not be in any shared object
*which will be unloaded*."
And that's the point. I need some of my servant classes to reside in shared
objects WICH CAN BE UNLOADED ON DEMAND.
...

Panczel, Levente








More information about the omniORB-list mailing list