fix transaction handling
This commit is contained in:
parent
c1d8d9aff0
commit
6f84ce51dd
@ -108,8 +108,12 @@ public class Transaction {
|
||||
}
|
||||
|
||||
public void commitTransaction() {
|
||||
try {
|
||||
entityManager.getTransaction().commit();
|
||||
} catch (Exception e) {
|
||||
throw new TechnicalException(e);
|
||||
}
|
||||
sendAll();
|
||||
entityManager.getTransaction().commit();
|
||||
transactionActive = false;
|
||||
}
|
||||
|
||||
@ -119,7 +123,7 @@ public class Transaction {
|
||||
try {
|
||||
entityManager.getTransaction().rollback();
|
||||
} catch (IllegalStateException e) {
|
||||
// can't rollback
|
||||
throw new TechnicalException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user