Subject | Re: JDBC disconnects by itself |
---|---|
Author | pp0475 |
Post date | 2004-11-04T14:37:12Z |
--- In Firebird-Java@yahoogroups.com, Gabriel Reid <gre@a...> wrote:
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!!
> Just a guess here: are you allowing your connection pool or datasource to
> be garbage collected? What I mean is, are you not holding on to areference to
> it somewhere? If so, that could explain the problem: when aconnection pool
> (which sits inside a firebird DataSource) is garbage collected, it getsconnections
> closed down, thus closing all connections. This could explain
> getting closed without you explicitly calling close().You got the point! That was the reason, so I had an own class for
>
> Gabriel
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!!