| java.lang.Object org.ow2.easybeans.tests.transaction.containermanaged.base.TestContainerTransactionException
All known Subclasses: org.ow2.easybeans.tests.transaction.containermanaged.base.TestNeverException, org.ow2.easybeans.tests.transaction.containermanaged.base.TestMandatoryException, org.ow2.easybeans.tests.transaction.containermanaged.base.TestSupportsException, org.ow2.easybeans.tests.transaction.containermanaged.base.TestNotSupportedException, org.ow2.easybeans.tests.transaction.containermanaged.base.TestRequiredNewException, org.ow2.easybeans.tests.transaction.containermanaged.base.TestRequiredException,
TestContainerTransactionException | abstract public class TestContainerTransactionException (Code) | | Verifies if the container manages well the runtime exception and the transaction among the beans.
author: Gisele Pinheiro Souza author: Eduardo Studzinski Estima de Castro |
Field Summary | |
final protected static String | DATABASE_1 Constant that defines the first database name. | final protected static String | DATABASE_2 Constant that defines the second database name. |
Method Summary | |
public void | createBeanRuntime(Class beanClass) Gets a new instance of the bean used in the runtime exception tests. | abstract public void | createBeanRuntime() Gets a new instance of the bean used in the runtime exception tests. | public void | deleteTable() Deletes the tables created during test. | public ItfContainerTransaction | getRuntimeBean() Returns the bean that throws a runtime exception. | public void | setup() Initiates all things needed to execute the tests. | public void | testCallOtherBeanNotSup() Verifies if the container manages the transaction among divers beans.The
first bean creates a table in the first database and calls other
bean(with transaction attribute NOT_SUPPORTS) to insert a table in the second
database. | public void | testCallOtherBeanReq() Verifies if the container manages the transaction among divers beans.The
first bean creates a table in the first database and calls other
bean(with transaction attribute REQUIRED) to insert a table in the second
database. |
DATABASE_1 | final protected static String DATABASE_1(Code) | | Constant that defines the first database name.
|
DATABASE_2 | final protected static String DATABASE_2(Code) | | Constant that defines the second database name.
|
createBeanRuntime | public void createBeanRuntime(Class beanClass) throws Exception(Code) | | Gets a new instance of the bean used in the runtime exception tests.
Parameters: beanClass - the bean class name used to make the lookup. throws: Exception - if a lookup error occurs. |
createBeanRuntime | abstract public void createBeanRuntime() throws Exception(Code) | | Gets a new instance of the bean used in the runtime exception tests.
throws: Exception - if a lookup error occurs. |
deleteTable | public void deleteTable() throws Exception(Code) | | Deletes the tables created during test.
throws: Exception - if a lookup error occurs. |
setup | public void setup() throws Exception(Code) | | Initiates all things needed to execute the tests.
throws: Exception - if an error occurs. |
testCallOtherBeanNotSup | public void testCallOtherBeanNotSup() throws Exception(Code) | | Verifies if the container manages the transaction among divers beans.The
first bean creates a table in the first database and calls other
bean(with transaction attribute NOT_SUPPORTS) to insert a table in the second
database. After the both insertions, the first bean throws a RuntimeException
exception. Also, verifies if the container throws an EJBException, discards the bean and does the rollback in
this case(if the transaction atttribute of the first bean has a
transaction context).
throws: Exception - if an error during the tests occurs. |
testCallOtherBeanReq | public void testCallOtherBeanReq() throws Exception(Code) | | Verifies if the container manages the transaction among divers beans.The
first bean creates a table in the first database and calls other
bean(with transaction attribute REQUIRED) to insert a table in the second
database. After the both insertions, the first bean throws a RuntimeException
exception. Also, verifies if the container throws an EJBException, discards the bean and does the rollback in
this case(if the transaction atttribute of the first bean has a
transaction context).
throws: Exception - if an error during the tests occurs. |
|
|