public class TestTransactionBase extends Object
| Constructor and Description |
|---|
TestTransactionBase(PersistenceFactory persistenceFactory,
javax.ejb.TransactionAttributeType transactionAttribute,
TestTransactionBase embedding)
Start a Transaction according to
TransactionAttributeType as AutoCloseable to make sure at the
end of the block the transaction is handled accordingly |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
used according to AutoCloseable to handle the transaction at the end according to
TransactionAttributeType
see also AutoCloseable.close() |
void |
close(boolean rollbackOnly)
Close the Transactioncontext
|
PersistenceFactory |
getPersistenceFactory() |
public TestTransactionBase(PersistenceFactory persistenceFactory, javax.ejb.TransactionAttributeType transactionAttribute, TestTransactionBase embedding)
TransactionAttributeType as AutoCloseable to make sure at the
end of the block the transaction is handled accordinglypersistenceFactory - The PersistenceFactory used to create and register EntityManagers for
the current thread if necessary.transactionAttribute - defines the kind of transaction to be started.embedding - the previous TestTransactionBase for this persistenceFactorypublic void close()
throws Exception
TransactionAttributeType
see also AutoCloseable.close()Exception - see AutoCloseable.close()public void close(boolean rollbackOnly)
throws Exception
rollbackOnly - rollbackonly was set externallyException - as possible during commit or rollback of transactions.public PersistenceFactory getPersistenceFactory()
Copyright © 2017–2018. All rights reserved.