1 25 package org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.xmldescriptor; 26 27 import javax.ejb.TransactionAttribute ; 28 import javax.ejb.TransactionAttributeType ; 29 30 import org.objectweb.easybeans.tests.common.db.TableManager; 31 32 38 public class SFSBTransAttributeDefinition implements ItfTransAttributeDefinition { 39 40 46 protected void insertTable(final String dbName, final String tableName) throws Exception { 47 TableManager tableManager = new TableManager(dbName); 48 tableManager.insertTable(tableName); 49 } 50 51 58 public void insertTableCorrect(final String dbName, final String tableName) throws Exception { 59 insertTable(dbName, tableName); 60 } 61 62 69 public void insertTableError(final String dbName, final String tableName) throws Exception { 70 insertTable(dbName, tableName); 71 throw new RuntimeException (); 72 } 73 74 81 @TransactionAttribute (TransactionAttributeType.MANDATORY) 82 public void insertTableCorrectMandatory(final String dbName, final String tableName) throws Exception { 83 insertTable(dbName, tableName); 84 } 85 86 93 @TransactionAttribute (TransactionAttributeType.MANDATORY) 94 public void insertTableErrorMandatory(final String dbName, final String tableName) throws Exception { 95 insertTable(dbName, tableName); 96 throw new RuntimeException (); 97 } 98 99 100 } 101 | Popular Tags |