Verifies if the container-managed transaction in the session bean is
following the JSR 220. The container must handle the different types of
exception in the transaction context. The items covered in this test are:
14.3.1
author: Gisele Pinheiro Souza author: Eduardo Studzinski Estima de Castro
Method Summary
public void
createBeanApp() Creates a bean that throws always an application exception that extends
Exception and has the rollback element as false.
public void
createBeanApp01() Creates a bean that throws always an application exception that extends
RuntimeException and has the rollback element as false.
public void
createBeanApp02() Creates a bean that throws always an application exception that extends
RuntimeException and has the rollback element as true.
public void
createBeanRollback() Creates a bean that throws always an application exception that extends
Exception and has the rollback element as true.
public void
createBeanRuntime() Creates a bean that throws always aa runtime exception.
public void
setup() Creates the bean intances, closes the transactions and cleans the
database.
public void
testNotUsingClientTransWithAppException() Inserts a table in an database and after throws an application exception
that extends Exception and has the rollback element as false.
testNotUsingClientTransWithAppRuntimeException() Inserts a table in an database and after throws an application exception
that extends RuntimeException and has the rollback element as false.
testUsingClientTransWithAppException() Inserts a table in an database and after throws an application exception
that extends Exception and has the rollback element as false.
public void
testUsingClientTransWithAppRollbackException() Inserts a table in an database and after throws an application exception
that extends Exception and has the rollback element as true.
public void
testUsingClientTransWithAppRuntimeException() Inserts a table in an database and after throws an application exception
that extends RuntimeException and has the rollback element as false.
Creates a bean that throws always an application exception that extends
Exception and has the rollback element as false.
throws: Exception - if an error during the bean creation occurs.
Creates a bean that throws always an application exception that extends
RuntimeException and has the rollback element as false.
throws: Exception - if an error during the bean creation occurs.
Creates a bean that throws always an application exception that extends
RuntimeException and has the rollback element as true.
throws: Exception - if an error during the bean creation occurs.
Creates a bean that throws always an application exception that extends
Exception and has the rollback element as true.
throws: Exception - if an error during the bean creation occurs.
Creates the bean intances, closes the transactions and cleans the
database.
throws: Exception - if an error during the bean creation occurs.
testNotUsingClientTransWithAppException
public void testNotUsingClientTransWithAppException() throws Exception(Code)
Inserts a table in an database and after throws an application exception
that extends Exception and has the rollback element as false. So, the
container must not rollback the transaction and must re-throw the
exception.
See Also:org.ow2.easybeans.tests.transaction.containermanaged.base.TestExceptionHandleBase throws: Exception - if an error during the tests occurs.
testNotUsingClientTransWithAppRollbackException
public void testNotUsingClientTransWithAppRollbackException() throws Exception(Code)
Inserts a table in an database and after throws an application exception
that extends Exception and has the rollback element as true. So, the
container must rollback the transaction and must re-throw the exception.
See Also:org.ow2.easybeans.tests.transaction.containermanaged.base.TestExceptionHandleBase throws: Exception - if an error during the tests occurs.
testNotUsingClientTransWithAppRuntimeException
public void testNotUsingClientTransWithAppRuntimeException() throws Exception(Code)
Inserts a table in an database and after throws an application exception
that extends RuntimeException and has the rollback element as false. So,
the container must not rollback the transaction and must re-throw the
exception.
See Also:org.ow2.easybeans.tests.transaction.containermanaged.base.TestExceptionHandleBase throws: Exception - if an error during the tests occurs.
public void testNotUsingClientTransWithAppRuntimeRollbackException() throws Exception(Code)
Inserts a table in an database and after throws an application exception
that extends RuntimeException and has the rollback element as true. So,
the container must rollback the transaction and must re-throw the
exception.
See Also:org.ow2.easybeans.tests.transaction.containermanaged.base.TestExceptionHandleBase throws: Exception - if an error during the tests occurs.
testNotUsingClientTransWithRuntimeException
public void testNotUsingClientTransWithRuntimeException() throws Exception(Code)
public void testUsingClientTransWithAppException() throws Exception(Code)
Inserts a table in an database and after throws an application exception
that extends Exception and has the rollback element as false. A client
transaction is used, but the container must starts a new one.So, the
container must not rollback the transaction and must re-throw the
exception.
See Also:org.ow2.easybeans.tests.transaction.containermanaged.base.TestExceptionHandleBase throws: Exception - if an error during the tests occurs.
testUsingClientTransWithAppRollbackException
public void testUsingClientTransWithAppRollbackException() throws Exception(Code)
Inserts a table in an database and after throws an application exception
that extends Exception and has the rollback element as true. A client
transaction is used, but the container must starts a new one.So, the
container must rollback the transaction and must re-throw the exception.
See Also:org.ow2.easybeans.tests.transaction.containermanaged.base.TestExceptionHandleBase throws: Exception - if an error during the tests occurs.
testUsingClientTransWithAppRuntimeException
public void testUsingClientTransWithAppRuntimeException() throws Exception(Code)
Inserts a table in an database and after throws an application exception
that extends RuntimeException and has the rollback element as false. A
client transaction is used, but the container must starts a new one.So,
the container must not rollback the transaction and must re-throw the
exception.
See Also:org.ow2.easybeans.tests.transaction.containermanaged.base.TestExceptionHandleBase throws: Exception - if an error during the tests occurs.
public void testUsingClientTransWithAppRuntimeRollbackException() throws Exception(Code)
Inserts a table in an database and after throws an application exception
that extends RuntimeException and has the rollback element as true. A
client transaction is used, but the container must starts a new one.So,
the container must rollback the transaction and must re-throw the
exception.
See Also:org.ow2.easybeans.tests.transaction.containermanaged.base.TestExceptionHandleBase throws: Exception - if an error during the tests occurs.
testUsingClientTransWithRuntimeException
public void testUsingClientTransWithRuntimeException() throws Exception(Code)
Inserts a table in an database and after throws a runtime exception. So,
the container must rollback the transaction, discards the bean and throws
an EJBException. A client transaction is used, but the transaction must
be resumed.
See Also:org.ow2.easybeans.tests.transaction.containermanaged.base.TestExceptionHandleBase throws: Exception - if an error during the tests occurs.
Fields inherited from org.ow2.easybeans.tests.transaction.containermanaged.base.TestExceptionHandleBase