* extends a runtime exception (with rollback = false) and does not do the
* rollback in this case. The test uses a client transaction.
* @throws Exception if an error during the tests occurs.
*/
public void testUsingClientTransWithAppRuntimeException() throws Exception {
UserTransaction utx = ExceptionHandleUtil.getUserTransaction();
utx.begin();
try {
sfsbContainerTransactionApp01.insertCorrectFirstErrorSecond(DATABASE_1, DATABASE_2);
fail("The container did not re-throw the application exception.");
} catch (AppRuntimeException e) {
logger.debug("The bean threw an expected error during the execution {0}", e);
}
// tries to commit
try {
utx.commit();
} catch (Exception e) {
logger.debug("The bean threw an expected error during the execution {0}", e);
}
// verifies if the table was created in the DATABASE_1
ExceptionHandleUtil.verifyTable(DATABASE_1, ItfContainerTransaction.TABLE);