fix transaction handling

This commit is contained in:
Peter Hormanns 2023-08-02 20:54:19 +02:00
parent c1d8d9aff0
commit 6f84ce51dd

View File

@ -108,8 +108,12 @@ public class Transaction {
}
public void commitTransaction() {
sendAll();
try {
entityManager.getTransaction().commit();
} catch (Exception e) {
throw new TechnicalException(e);
}
sendAll();
transactionActive = false;
}
@ -119,7 +123,7 @@ public class Transaction {
try {
entityManager.getTransaction().rollback();
} catch (IllegalStateException e) {
// can't rollback
throw new TechnicalException(e);
}
}