1 25 package org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.transaction; 26 27 import java.sql.SQLException ; 28 29 import javax.ejb.Remote ; 30 import javax.ejb.Stateless ; 31 import javax.ejb.TransactionAttribute ; 32 import javax.ejb.TransactionAttributeType ; 33 import javax.ejb.TransactionManagement ; 34 import javax.ejb.TransactionManagementType ; 35 import javax.naming.NamingException ; 36 37 import org.objectweb.easybeans.tests.common.db.TableManager; 38 39 45 @Stateless 46 @TransactionManagement (value = TransactionManagementType.CONTAINER) 47 @Remote (ItfTransactionMisc00.class) 48 public class SLSBTransactionMisc00 implements ItfTransactionMisc00 { 49 50 56 @TransactionAttribute (value = TransactionAttributeType.REQUIRED) 57 public void insertTableWithRequired(final String dbName) throws SQLException , NamingException { 58 TableManager tableManager = new TableManager(dbName); 59 tableManager.insertTable(TABLE); 60 } 61 62 68 @TransactionAttribute (value = TransactionAttributeType.NOT_SUPPORTED) 69 public void insertTableWithNotSupported(final String dbName) throws SQLException , NamingException { 70 TableManager tableManager = new TableManager(dbName); 71 tableManager.insertTable(TABLE); 72 } 73 74 } 75 | Popular Tags |