1 25 package org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.xmldescriptor; 26 27 import javax.ejb.EJB ; 28 import javax.ejb.Remote ; 29 import javax.ejb.Stateful ; 30 import javax.naming.NamingException ; 31 import javax.transaction.HeuristicMixedException ; 32 import javax.transaction.HeuristicRollbackException ; 33 import javax.transaction.NotSupportedException ; 34 import javax.transaction.RollbackException ; 35 import javax.transaction.SystemException ; 36 37 import org.objectweb.easybeans.tests.common.exception.TransactionException; 38 import org.objectweb.easybeans.tests.common.helper.EJBHelper; 39 40 46 @Stateful 47 @Remote (ItfOverrideTester00.class) 48 public class SFSBOverrideTester00 implements ItfOverrideTester00 { 49 50 53 @EJB (beanName = "SLSBSimpleBeanOverrideLocal") 54 private ItfSimpleBeanOverridedLocal bean1; 55 56 59 @EJB (beanName = "SLSBSimpleBeanOverrideLocal") 60 private ItfSimpleBeanOverridedRemote bean2; 61 62 65 public void testLocalInjection() { 66 bean1.toString(); 67 } 68 69 73 public void testRemoteInjection() { 74 bean2.toString(); 75 } 76 77 82 public void testLookupLocal() throws Exception { 83 ItfSimpleBeanOverridedLocal bean = EJBHelper.getBeanLocalInstance(SFSBSimpleBeanOverrided.class, 84 ItfSimpleBeanOverridedLocal.class); 85 bean.toString(); 86 } 87 88 93 public void testLookupRemote() throws Exception { 94 ItfSimpleBeanOverridedRemote bean = EJBHelper.getBeanRemoteInstance(SFSBSimpleBeanOverrided.class, 95 ItfSimpleBeanOverridedRemote.class); 96 bean.toString(); 97 } 98 99 114 public void testTransactionType() throws IllegalStateException , SecurityException , HeuristicMixedException , 115 HeuristicRollbackException , RollbackException , SystemException , NotSupportedException , NamingException { 116 bean1.verifyBMT(); 117 bean2.verifyBMT(); 118 } 119 120 } 121 | Popular Tags |