[omniORB] How to remove 'expired' objects from omniORB2 BOA i
n the server i mplementation?
Thomas Bednarz
bednarz@smartsol.ch
Thu, 4 Feb 1999 10:45:14 +0100
David,
Many thanks, things are clear now. Sorry, I did not SEARCH the archive
before, but now I found some of the threads.
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
---------------------------------------
> -----Original Message-----
> From: David Riddoch [mailto:djr@orl.co.uk]
> Sent: Wednesday, February 03, 1999 11:03 AM
> To: Thomas Bednarz
> Cc: 'omniorb-list@orl.co.uk'
> Subject: Re: [omniORB] How to remove 'expired' objects from
> omniORB2 BOA
> in the server i mplementation?
>
>
>
> Thomas,
>
> Server objects do not maintain a reference count of remote
> clients. They
> only have a reference count of local references (ie local
> clients, and one
> for the BOA). Thus when you call _dispose, the object will be deleted
> unless there are any locally held references. Whether or not remote
> clients still hold references, or even still exist is not
> considered. (The
> ORB takes care that no calls are in progress when it deletes
> the object!).
>
> There is no timestamp in the object table. You'll need to
> implement some
> scheme yourself for keeping track of clients. This has been
> discused quite
> a few times on the list - so have a look at the mailing list archive:
> http://www.orl.co.uk/omniORB/archives/
> http://www.orl.co.uk/search.html
>
> I hope this answers your question.
>
> David
>
>
>
> On Mon, 1 Feb 1999, Thomas Bednarz wrote:
>
> > 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?
>
>