Subject Driver bug
Author Blas Rodriguez Somoza
Hello

During my tests I found the following problem. Sometimes when creating two related tables (master_table and slave_table), the
second executeUpdate which create slave_table fails and throw the following exception.

java.sql.SQLException: Error during autocommit: javax.resource.ResourceException: couldn't commit local transaction:
javax.transaction.xa.XAException: unsuccessful metadata update
object MASTER_TABLE is in use
at org.firebirdsql.jdbc.FBConnection.checkEndTransaction(FBConnection.java:872)
at org.firebirdsql.jdbc.FBStatement.executeUpdate(FBStatement.java:159)

The table slave_table has a foreign key referencing master_table.

That only happens sometimes, but when it happens then the master_table remain locked and when the connection is closed the
driver answers with " java.lang.IllegalStateException can't destroy managed connection with active transaction ." or locks the
application.

After some time I discover that the problem is not in the executeUpdate Statement, but in a previous test with Connection class.
There is some failure in the Connection class that lets the driver in a buggy state when one connection is open and another
connection with the same parameters is opened and closed. The two connections are opened in the same Thread, altough the driver is
loaded in a different thread.

Regards
Blas Rodriguez Somoza.