Subject Re: [Firebird-Java] JDBC disconnects by itself
Author Roman Rokytskyy
Hi,

> Sending SELECT statements to database works fine, but then when I
> start to work with INSERT -statements I will encounter a nasty problem:
>
> Using AutoCommit property on I can do ~200 INSERT statements, and
> then the driver disconnects the connection by itself, and I'll get
> an exception:
>
> org.firebirdsql.jdbc.FBSQLException: Connection
> org.firebirdsql.pool.PooledConnectionHandler@3468f4 was closed. See
> attached exception to find the place where it was closed
>
> StackTrace:
> at
> org.firebirdsql.pool.PooledConnectionHandler.invoke(PooledConnection
> Handler.java:212) at $proxy0.isClosed(Unknown Source) ...

This exception means that Connection.close() was called from the application
itself. And its stack trace shows exact place in your application where it
was closed.

> What could be a problem, is there any settings which could affect to
> this behaviour or is there a bug in JDBC-driver?

Can be a bug in pool (very unlikely), but most likely it is a bug in your
application. Check the stack trace of the attached SQLException to see the
place where the close() method was called.

Roman