[omniORB] How to remove 'expired' objects from omniORB2 BOA in the server i
mplementation?
Thomas Bednarz
bednarz@smartsol.ch
Mon, 1 Feb 1999 18:02:25 +0100
Hello omniORBers!
I have a little problem with dynamically created objects. I have implemented
a Factory Object which is the only object registred with the BOA when my
deamon process starts. This object implements methods to create other
objects. A client can call such a method and then a special constructor of
the object is called on the server. The data is retrieved from somewhere to
'fill' the object. When the client has finished it should call a function to
tell the server, that he does not need the object anymore. The
implementation calls _dispose and/or CORBA::release().
If I correctly understand the documentation the _dispose function calls
CORBA::release() only if the reference counter is 0. If it is >0 the object
remains in the servers memory. This can be the case, if a client does not
call the remove function or if a client terminates unexpectedly (crashing
Microsoft PC!) or if the client is a Browser (Servlet / Applet) and the
activities from there are never terminated. So my server needs to implement
something like a watchdog who removes expired objects. For all of the
dynamically created objects, I should set a configurable maximum livetime.
The question is: is there any possibility to find out how many object
references exist for a specific active object in the BOA? Is there
eventually something like a timestamp of the Object activation available?
Many thanks for any help!
Thomas
---------------------------------------
SMART Solutions AG
Software Engineering & Consulting
PO Box
Oberwiesenstrasse 5
CH-8304 Wallisellen / Switzerland
Phone: +41 1 877 72 72
FAX: +41 1 883 16 79
Web: www.smartsol.ch
---------------------------------------