1 25 package org.objectweb.easybeans.tests.transaction.containermanaged.stateful; 26 27 import java.sql.SQLException ; 28 29 import javax.ejb.EJBException ; 30 31 import org.objectweb.easybeans.tests.common.ejbs.base.transaction.ItfContainerTransaction; 32 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransacRequiredNewApp01; 33 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransacRequiredNewApp02; 34 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransacRequiredNewRollback; 35 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransacRequiredNewRuntime; 36 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.transaction.SFSBContainerTransactionRequiredNewApp; 37 import org.objectweb.easybeans.tests.transaction.containermanaged.base.ExceptionHandleUtil; 38 import org.objectweb.easybeans.tests.transaction.containermanaged.base.TestExceptionHandleBase; 39 import org.testng.annotations.BeforeMethod; 40 import org.testng.annotations.Test; 41 42 59 public class TestExceptionHandleRequiredNew extends TestExceptionHandleBase { 60 61 66 @BeforeMethod 67 @Override 68 public void setup() throws Exception { 69 super.setup(); 70 } 71 72 77 @Override 78 public void createBeanApp() throws Exception { 79 super.createBeanApp(SFSBContainerTransactionRequiredNewApp.class); 80 } 81 82 87 @Override 88 public void createBeanApp01() throws Exception { 89 super.createBeanApp01(SFSBContainerTransacRequiredNewApp01.class); 90 } 91 92 97 @Override 98 public void createBeanApp02() throws Exception { 99 super.createBeanApp02(SFSBContainerTransacRequiredNewApp02.class); 100 } 101 102 107 @Override 108 public void createBeanRollback() throws Exception { 109 super.createBeanRollback(SFSBContainerTransacRequiredNewRollback.class); 110 } 111 112 116 @Override 117 public void createBeanRuntime() throws Exception { 118 super.createBeanRuntime(SFSBContainerTransacRequiredNewRuntime.class); 119 } 120 121 131 @Test(groups = {"application rollback exception tests"}, expectedExceptions = SQLException .class) 132 @Override 133 public void testNotUsingClientTransWithAppRollbackException() throws Exception { 134 super.testNotUsingClientTransWithAppRollbackException(); 135 } 136 137 147 @Test(groups = {"application exception tests"}) 148 @Override 149 public void testNotUsingClientTransWithAppException() throws Exception { 150 super.testNotUsingClientTransWithAppException(); 151 } 152 153 163 @Test(groups = {"runtime exception tests"}, expectedExceptions = SQLException .class) 164 @Override 165 public void testNotUsingClientTransWithRuntimeException() throws Exception { 166 super.testNotUsingClientTransWithRuntimeException(); 167 } 168 169 180 @Test(expectedExceptions = SQLException .class) 181 @Override 182 public void testNotUsingClientTransWithAppRuntimeRollbackException() throws Exception { 183 super.testNotUsingClientTransWithAppRuntimeRollbackException(); 184 } 185 186 197 @Test 198 @Override 199 public void testNotUsingClientTransWithAppRuntimeException() throws Exception { 200 super.testNotUsingClientTransWithAppRuntimeException(); 201 } 202 203 214 @Test(groups = {"application rollback exception tests"}, expectedExceptions = SQLException .class) 215 public void testUsingClientTransWithAppRollbackException() throws Exception { 216 super.testUsingClientTransWithAppRollbackException(true); 217 } 218 219 231 @Override 232 @Test(groups = {"application exception tests"}) 233 public void testUsingClientTransWithAppException() throws Exception { 234 super.testUsingClientTransWithAppException(); 235 } 236 237 248 @Test(groups = {"runtime exception tests"}, expectedExceptions = SQLException .class) 249 public void testUsingClientTransWithRuntimeException() throws Exception { 250 super.testUsingClientTransWithRuntimeException(EJBException .class, true); 251 ExceptionHandleUtil.verifyTable(DATABASE_1, ItfContainerTransaction.TABLE); 253 } 254 255 267 @Test(expectedExceptions = SQLException .class) 268 public void testUsingClientTransWithAppRuntimeRollbackException() throws Exception { 269 super.testUsingClientTransWithAppRuntimeRollbackException(true); 270 } 271 272 284 @Override 285 @Test 286 public void testUsingClientTransWithAppRuntimeException() throws Exception { 287 super.testUsingClientTransWithAppRuntimeException(); 288 289 } 290 291 } 292 | Popular Tags |