-
Bug
-
Resolution: Done
-
Major
-
JBossAS-4.0.3RC1
-
None
The "lazy" auto-commit optimization (to avoid repeated setAutoCommit invocations on the driver/network/db)
does not work for datasource connections not enlisted in JTA transaction with no work done.
Example from the forums:
DataSource ds = getDataSource();
Connection con = ds.getConnection();
con.setAutoCommit(false); // not propagated to driver
con.rollback(); // driver throws an exception because autocommit is true.
The fix is trivial and probably originally a typo since rollback(Savepoint) has the correct code.
org.jboss.resource.adapter.jdbc.WrappedConection::rollback()
{
- checkStatus();
+ checkTransaction();
mc.jdbcRollback();
}