| java.lang.Object org.ow2.easybeans.tests.common.ejbs.base.transaction.ContainerTransaction org.ow2.easybeans.tests.common.ejbs.base.transaction.ContainerTransactionDefault
All known Subclasses: org.ow2.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransactionDefaultApp, org.ow2.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransactionDefaultRollback, org.ow2.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransactionDefault, org.ow2.easybeans.tests.common.ejbs.stateless.containermanaged.transaction.SLSBContainerTransactionDefault, org.ow2.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransacDefaultApp01, org.ow2.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransacDefaultApp02, org.ow2.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransactionDefaultRuntime,
ContainerTransactionDefault | public class ContainerTransactionDefault extends ContainerTransaction (Code) | | Inserts the table test in two databases without using annotations that
specify the transaction attribute. By default, the transaction attribute is
REQUIRED in all methods.
author: Gisele Pinheiro Souza author: Eduardo Studzinski Estima de Castro |
getRollbackOnly | public boolean getRollbackOnly() throws TransactionException(Code) | | Calls the method EJBContext.getRollbackOnly().
true if the rollback only is set, false otherwise. throws: TransactionException - if an IllegalStateException occurs. |
insertCorrectFirstErrorSecond | public void insertCorrectFirstErrorSecond(String db1, String db2) throws Exception(Code) | | Inserts the table test in the first database and makes an incorrect query in the second database.
This method is using required transaction, so this must to force a roll back.
Parameters: db1 - the first databse name. Parameters: db2 - the second database name. throws: Exception - if an error occurs. |
insertCorrectTableInBothDB | public void insertCorrectTableInBothDB(String db1, String db2) throws Exception(Code) | | Inserts the table test in both database using required transaction.
Parameters: db1 - the first databse name. Parameters: db2 - the second database name. throws: Exception - if an error occurs. |
setRollbackOnly | public void setRollbackOnly(String dbName1, String dbName2) throws Exception, NamingException(Code) | | Calls the method SessionContext.setRollbackOnly().
Parameters: dbName1 - the first database where the table should be inserted. Parameters: dbName2 - the second database where the table should be inserted. throws: Exception - if an error occurs. |
|
|