| java.lang.Object org.ow2.easybeans.tests.transaction.containermanaged.base.ExceptionHandleUtil
ExceptionHandleUtil | final public class ExceptionHandleUtil (Code) | | Has useful methods for the transaction tests.
author: Gisele Pinheiro Souza author: Eduardo Studzinski Estima de Castro |
cleanTransaction | public static void cleanTransaction() throws Exception(Code) | | Makes a rollback in the transaction that is active.
throws: Exception - if an error occurs during the rollback. |
deleteTable | public static void deleteTable(String dbName, String tableName) throws Exception(Code) | | Deletes the table in the database.
Parameters: dbName - the database name in the registry. Parameters: tableName - the table name. throws: Exception - if a lookup error occurs. |
getUserTransaction | public static UserTransaction getUserTransaction() throws NamingException(Code) | | Gets a new transaction.
throws: NamingException - if a lookup error occurs. the class UserTransaction. |
isDiscarded | public static boolean isDiscarded(ItfContainerTransaction bean) throws Exception(Code) | | Calls the bean method toString() to verify if the bean was discarded.
Parameters: bean - the bean that is verified. true if the bean is discarded and false otherwise. throws: Exception - if an error during the test occurs. |
transactionIsActive | public static boolean transactionIsActive() throws SystemException, NamingException(Code) | | Verifies if the transaction in the client side is active.
true if the transaction is active, false otherwise. throws: SystemException - if a transaction exception occurs. throws: NamingException - if a lookup error occurs. |
verifyTable | public static void verifyTable(String database, String tableName) throws Exception(Code) | | Verifies if the table was created in the database.
Parameters: database - the database name. Parameters: tableName - the table name verified. throws: Exception - if an error when the bean is goten occurs. |
|
|