Skip to content

Commit

Permalink
LDEV-4017 remove try and close
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Jun 3, 2023
1 parent 8fadb56 commit b4e8ddb
Showing 1 changed file with 11 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,23 +88,20 @@ public void rollback() {
@Override
public void end() {
// try was removed in ortus branch
try {
if (doRollback) {
trans.rollback();
if (autoManage) {
session.clear();
}
}
else {
if (trans.getStatus() == TransactionStatus.COMMITTED) {
trans.commit();
}
session.flush();

if (doRollback) {
trans.rollback();
if (autoManage) {
session.clear();
}
}
finally {
session.close();
else {
if (trans.getStatus() == TransactionStatus.COMMITTED) {
trans.commit();
}
session.flush();
}

}

/**
Expand Down

0 comments on commit b4e8ddb

Please sign in to comment.