Re: using ORBit_small_listen_for_broken() with bonobo objects



A Seg, 2004-07-12 às 20:28, Ben Liblit escreveu:
> Gustavo J. A. M. Carneiro wrote:
> >   CORBA_Object ref = BONOBO_OBJREF(server);
> 
> Ah, I knew it had to be something simple.  Thanks.
> 
> > ORBit_small_listen_for_broken() is meant to be used by the clients of a
> > particular server object do detect when the connection with the server
> > got lost.  In the server side there is no connection with its own
> > objects, so...
> 
> ...so it won't even trigger the callback?

  No.  There is no "connection", how can Bonobo monitor something that
doesn't exist?

> 
> Hmm.  That's too bad.  When a client dies, the server is left holding an 
> instance created by that client which will never be destroyed.  It's 
> effectively a leak.  Is there no way to detect and clean up after dead 
> clients?

  No.

  Unless the client exposes some object and you keep a reference to it. 
Then, you could listen for the connection to the client object and
unref() the local object when the client disconnects.

  One thing that would prevent this problem would be leases, as in
Jini[1].  Unfortunately Bonobo doesn't support this model.

  Regards.

[1] http://wwws.sun.com/software/jini/specs/jini1.2html/lease-spec.html

-- 
Gustavo J. A. M. Carneiro
<gjc inescporto pt> <gustavo users sourceforge net>
The universe is always one step beyond logic




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]