Subject Re: JDBC disconnects by itself
Author pp0475
--- In Firebird-Java@yahoogroups.com, Gabriel Reid <gre@a...> wrote:

> Just a guess here: are you allowing your connection pool or data
source to
> be garbage collected? What I mean is, are you not holding on to a
reference to
> it somewhere? If so, that could explain the problem: when a
connection pool
> (which sits inside a firebird DataSource) is garbage collected, it gets
> closed down, thus closing all connections. This could explain
connections
> getting closed without you explicitly calling close().
>
> Gabriel

You got the point! That was the reason, so I had an own class for
creating the connection, but returned to calling class only the
connection - not the datasource.

I changed the application, so I now return the whole datasource
-object. Now I have a reference of the datasource and garbage
collection can't shutdown the connection.

Thank's a lot!!