Subject exception with multiple threads
Author Stanislav Mironov
Hi All!

I occasionally get this exception while using JDBC from multiple threads.
java.lang.IllegalStateException: registerStatement called with no
transaction
at
org.firebirdsql.jca.FBManagedConnection.registerStatement(FBManagedConnection.java:851)
at
org.firebirdsql.jdbc.AbstractConnection.registerStatement(AbstractConnection.java:927)
at
org.firebirdsql.jdbc.FBStatementFetcher.<init>(FBStatementFetcher.java:67)
at org.firebirdsql.jdbc.FBResultSet.<init>(FBResultSet.java:120)
at
org.firebirdsql.jdbc.AbstractStatement.getResultSet(AbstractStatement.java:544)
at
org.firebirdsql.jdbc.AbstractPreparedStatement.executeQuery(AbstractPreparedStatement.java:120)
at <my code>

<my code>:
ps = connection.prepareStatement(sql);
ps.setInt(1, ...); 2.. 3...
ps.executeQuery(); // <- here exception occurs

FB 1.5.0, JDBC 1.0.1

How to solve?

--
Stanislav Mironov