1 25 package org.objectweb.easybeans.tests.transaction.containermanaged.stateful; 26 27 import java.sql.SQLException ; 28 29 import javax.ejb.EJBTransactionRolledbackException ; 30 31 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransacMandatoryApp01; 32 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransacMandatoryApp02; 33 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransacMandatoryRollback; 34 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransactionMandatoryApp; 35 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransactionMandatoryRuntime; 36 import org.objectweb.easybeans.tests.transaction.containermanaged.base.TestExceptionHandleBase; 37 import org.testng.annotations.BeforeMethod; 38 import org.testng.annotations.Test; 39 40 57 public class TestExceptionHandleMandatory extends TestExceptionHandleBase{ 58 59 64 @BeforeMethod 65 @Override 66 public void setup() throws Exception { 67 super.setup(); 68 } 69 70 75 @Override 76 public void createBeanApp() throws Exception { 77 super.createBeanApp(SFSBContainerTransactionMandatoryApp.class); 78 79 } 80 81 86 @Override 87 public void createBeanApp01() throws Exception { 88 super.createBeanApp01(SFSBContainerTransacMandatoryApp01.class); 89 90 } 91 92 97 @Override 98 public void createBeanApp02() throws Exception { 99 super.createBeanApp02(SFSBContainerTransacMandatoryApp02.class); 100 } 101 102 107 @Override 108 public void createBeanRollback() throws Exception { 109 super.createBeanRollback(SFSBContainerTransacMandatoryRollback.class); 110 } 111 112 116 @Override 117 public void createBeanRuntime() throws Exception { 118 super.createBeanRuntime(SFSBContainerTransactionMandatoryRuntime.class); 119 } 120 121 131 @Test 132 @Override 133 public void testUsingClientTransWithAppException() throws Exception { 134 super.testUsingClientTransWithAppException(); 135 } 136 137 148 @Test(expectedExceptions = SQLException .class) 149 public void testUsingClientTransWithAppRollbackException() throws Exception { 150 super.testUsingClientTransWithAppRollbackException(false); 151 } 152 153 163 @Test(expectedExceptions = SQLException .class) 164 public void testUsingClientTransWithAppRuntimeRollbackException() throws Exception { 165 super.testUsingClientTransWithAppRuntimeRollbackException(false); 166 } 167 168 178 @Test 179 @Override 180 public void testUsingClientTransWithAppRuntimeException() throws Exception { 181 super.testUsingClientTransWithAppRuntimeException(); 182 } 183 184 194 @Test(groups = {"runtime exception tests"}) 195 public void testUsingClientTransWithRuntimeException() throws Exception { 196 super.testUsingClientTransWithRuntimeException(EJBTransactionRolledbackException .class, false); 197 } 198 } 199 | Popular Tags |