Fix for #79 - Rollback in case of connection closed - deactivate() not called when connection.rollback() fails

This commit is contained in:
Rob Bygrave
2014-03-20 20:14:14 +13:00
parent 5a5f479568
commit f85fa2c21d
@@ -634,12 +634,13 @@ public class JdbcTransaction implements SpiTransaction {
try {
connection.rollback();
} catch (Exception ex) {
throw new PersistenceException(ex);
} finally {
// these will not throw an exception
deactivate();
notifyRollback(cause);
} catch (Exception ex) {
throw new PersistenceException(ex);
}
}