Also it seems to me that having JdbcLocalResourceTransaction.TransactionDriverControlImpl.markRollbackOnly() empty is rather unsafe. With transaction pattern
Transaction tx = session.getTransaction(); tx.begin(); try { session.doSomething(); } catch (Exception e) { tx.markRollbackOnly(); throw e; } finally { if (tx.getStatus() == TransactionStatus.ACTIVE) { tx.commit(); } else { tx.rollback(); } }
this leads to committing a transaction in which an exception was thrown.