Re: using ORBit_small_listen_for_broken() with bonobo objects
"Gustavo J. A. M. Carneiro" <[email protected]> Mon, 12 Jul 2004 10:39:24 +0100
| Newsgroups | gmane.comp.gnome.components |
|---|---|
| Organization | INESC Porto |
| Message-ID | <[email protected]> |
A Seg, 2004-07-12 às 08:10, Ben Liblit escreveu: > I have a fairly simple server implemented as a Bonobo factory. Each > client causes the factory to create one instance of a trivial > BonoboObject subclass. The factory uses > bonobo_running_context_auto_exit_unref() to exit when the last client > shuts down. This works fine when clients exit properly, but not when > clients die abruptly, e.g. by crashing. > > It seems that ORBit_small_listen_for_broken() is the thing to use here. > But I don't see how to hook that up properly: > > Given an instance of a BonoboObject subclass, how do I obtain the > corresponding CORBA_Object to use in the call to CORBA_Object ref = BONOBO_OBJREF(server); > ORBit_small_listen_for_broken()? Is that even a meaningful thing to ask > for, or is the BonoboObject/CORBA_Object relationship more subtle? I don't think it makes much sense what you're trying to do. 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... > > Suppose ORBit_small_listen_for_broken() calls me back, and tells me that > a connection has indeed been broken. What should I do with the > BonoboObject instance in the server? How do I inform this instance (and > its factory) that it should go away? Do I use bonobo_object_unref(), > bonobo_object_release_unref(), ... ? > > Thank you for your help! > _______________________________________________ > gnome-components-list mailing list > [email protected] > http://mail.gnome.org/mailman/listinfo/gnome-components-list -- Gustavo João Alves Marques Carneiro <[email protected]> <[email protected]> The universe is always one step beyond logic.