1 25 package org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.xmldescriptor; 26 27 import javax.ejb.Local ; 28 import javax.ejb.Remote ; 29 import javax.ejb.Stateful ; 30 import javax.ejb.TransactionManagement ; 31 import javax.ejb.TransactionManagementType ; 32 import javax.naming.NamingException ; 33 import javax.transaction.HeuristicMixedException ; 34 import javax.transaction.HeuristicRollbackException ; 35 import javax.transaction.NotSupportedException ; 36 import javax.transaction.RollbackException ; 37 import javax.transaction.SystemException ; 38 import javax.transaction.UserTransaction ; 39 40 import org.objectweb.easybeans.tests.common.exception.TransactionException; 41 import org.objectweb.easybeans.tests.common.helper.TransactionHelper; 42 43 55 @Stateful (name = "SFSBSimpleBeanByAnnotation") 56 @TransactionManagement (TransactionManagementType.CONTAINER) 57 @Local (ItfSimpleBeanOverridedRemote.class) 58 @Remote (ItfSimpleBeanOverridedLocal.class) 59 public class SFSBSimpleBeanOverrided implements ItfSimpleBeanOverridedLocal, ItfSimpleBeanOverridedRemote { 60 61 69 public void openTransaction() throws NamingException , NotSupportedException , SystemException { 70 UserTransaction utx = TransactionHelper.getUserTransaction(); 71 utx.begin(); 72 } 73 74 89 public void verifyBMT() throws IllegalStateException , SecurityException , HeuristicMixedException , 90 HeuristicRollbackException , RollbackException , SystemException , NotSupportedException , NamingException { 91 UserTransaction utx = TransactionHelper.getUserTransaction(); 92 utx.begin(); 93 utx.commit(); 94 } 95 } 96 | Popular Tags |