Re: Gda_ConnectionPool



Vivien Malerba wrote:

> On Wed, Oct 11, 2000 at 04:11:58PM +0200, rodrigo linuxave net wrote:
> > Vivien Malerba wrote:
> >
> > > Hi!
> > >
> > > Form what I understand the Gda_ConnectionPool takes care of a list of
> > > connections and can close all of them. What about when a connection is
> > > not used anymore? There is no mechanism to care about unused connections
> > > and destroy them.
> > >
> > > Should I add a gda_connection_pool_close() function which, from a client
> > > point of view will decrease the the reference count and destroy the connection
> > > when it reaches 0?
> > >
> >
> > the Gda_ConnectionPool is just started, so it's missing lots of fonctionality.
> > What you say is one of them. I had thought that, instead of having the client
> > call gda_connection_pool_close(), have a timeout for closing the connection. I am
> > not sure which one is better, since your proposition is ok, but if a client
> > crashes, the connection will remain open for always, since
> > gda_connection_pool_close() is never call. And my idea has also drawbacks, since
> > there could be a client inactive for 20 hours, for example, but it still believes
> > the connection is established.
> >
> > so, what do you think?
>
> AFAIK the Gda_ConnectionPool object is in the libgda-client.so library, which
> means it is part of a program which uses the object, so if the application
> crashes, we have the same problem as with any other CORBA call (BTW I don't know how
> it is handled!). I mean that this problem is not specific to the Gda_ConnectionPool
> object. Or am I wrong?
>
> So I think it would be nice to use the gtk_object_ref(), etc functions here.
>
> Tell me if I'm wrong.
>

oops, you're right, it's just a client, and if it crashes, the lib will go also away.
So, go on, do it as you say.

About the crashes in CORBA related stuff, there is no way (not that I know of) of
knowing when the server or the client crashed. The workaround I've seen in some places
is to have a ping method in the IDL which is called regularly to see if the other end
is still alive. If somebody knows a better solution...

cheers





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