Subject Re: [Firebird-Java] Problems with FBXaDataSource in ApplicationServer
Author Mark Rotteveel
On 4-3-2014 11:48, Sascha Horn wrote:
> i am using JBoss 7.3.0 with Jaybird 2.2.4 to connect to an Firebird
> SuperServer.
> In a ejb with container managed transaction i am using a
> org.firebirdsql.ds.FBXADataSource to get a Firebird connection.
> From this connections i create two statements.
> Statement on executes a query and gets an resultset.
> While i iterate though the rows and execute an other
> query on statement2.
> executing statement2 causes the resultset from statement1 is closed.
> I googled a bit...
> The solution should be to use setautocommit(false), but this is not
> possible in an container managed transaction.
> as a workarround i use setDefaultResultSetHoldable(true).
> In my opinion the result set may not be closed within an managed
> transaction, because commit and rollback should be invoked from the
> managed transaction.
> Can anyone confirm that this a bug in Jaybird driver?
> Or am i doing something wrong?

This definitely sounds like a bug. The behavior is as if autocommit is
enabled, which shouldn't be the case for a managed transaction.

> An other problem is, that when rolling back the container managed
> transaction every time the following exception occurs:
> org.firebirdsql.jca.FBXAException: invalid database handle (no active
> connection)
> With an oracle DB and the matching oracle driver the rollback works, so
> i guess it is a driver problem?

Could you report both as separate issues on the tracker
( ), preferably including a
small reproduction program.

For the second, please include the full stacktrace of the exception.

Mark Rotteveel