Subject | Re: [Firebird-Java] Re: JDBC disconnects by itself |
---|---|
Author | Roman Rokytskyy |
Post date | 2004-11-04T14:03:38Z |
> Yes, the pool seems to be down and I continue using it 'cause ICan you post the complete method you use to instantiate the pool and
> haven't closed that myself. What I do in my app is:
complete method you use to get the connection?
Can it be that your code is something like this:
private Connection getConnection() throws SQLException {
FBWrappingDataSource ds = new FBWrappingDataSource();
ds.set....
....
return ds.getConnection();
}
If this is your case, the you have the problem described by Gabriel Reid.
Your pool (instance "ds") is no longer referenced and is garbage collected.
When pool is garbage collected, it is shutted down and all connections are
closed.
Roman