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