fix transaction handling
This commit is contained in:
parent
c1d8d9aff0
commit
6f84ce51dd
@ -108,8 +108,12 @@ public class Transaction {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void commitTransaction() {
|
public void commitTransaction() {
|
||||||
sendAll();
|
try {
|
||||||
entityManager.getTransaction().commit();
|
entityManager.getTransaction().commit();
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new TechnicalException(e);
|
||||||
|
}
|
||||||
|
sendAll();
|
||||||
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user