- Common ways to obtain TransactionException
private void myMethod () {TransactionException t =
Object[] arguments;new TransactionException(ExceptionMessageGenerator.buildMessage(TransactionException.class, errorNumber, arguments))
TransactionException.externalTransactionNotActive()
UnitOfWorkImpl unitOfWork;TransactionException.inactiveUnitOfWork(unitOfWork)
- Smart code suggestions by Codota
}
protected void throwUserTransactionException() { throw TransactionException.entityTransactionWithJTANotAllowed(); }
/** * An ENtityTransaction cannot be used at the same time as a JTA transaction * throw an exception */ public EntityTransaction getTransaction(){ throw new IllegalStateException(TransactionException.entityTransactionWithJTANotAllowed().getMessage()); }