Subject Problem on reconnection
Author sp64_asaon
There is a well known "object in use" error in InterBase/Firebird
(see release notes of Firebird 1.5) during meta data updates. As a
workaround I reexecute the sql statement after closing and reopening
the connection. This works fine with InterClient, but fails with
JayBird, it hangs on:

java.net.SocketInputStream.socketRead(Native Method)
java.net.SocketInputStream.read(SocketInputStream.java:86)
java.io.BufferedInputStream.fill(BufferedInputStream.java:186)
java.io.BufferedInputStream.read(BufferedInputStream.java:204)
java.io.DataInputStream.readInt(DataInputStream.java:338)
org.firebirdsql.jgds.GDS_Impl.nextOperation(GDS_Impl.java:1471)
org.firebirdsql.jgds.GDS_Impl.isc_dsql_execute2(GDS_Impl.java:728)
org.firebirdsql.jca.FBManagedConnection.executeStatement
(FBManagedConnection.java:593)
org.firebirdsql.jdbc.FBConnection.executeStatement
(FBConnection.java:1104)
org.firebirdsql.jdbc.FBStatement.internalExecute
(FBStatement.java:929)
org.firebirdsql.jdbc.FBStatement.executeUpdate(FBStatement.java:146)

To reproduce the problem I uploaded a test program to the yahoo file
area:
http://groups.yahoo.com/group/Firebird-Java/files/TestReconnect.java

Could this be caused by some problems in the resource management
(connection, statement, socket, ...)?

Best regards
Stephan