1 25 package org.objectweb.easybeans.tests.sessionbean.stateful.sbinterface; 26 27 import static org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.CallbackType.PRE_DESTROY; 28 import static org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.callbacklogger.ItfCallbackLoggerAccess.SLEEP; 29 import static org.objectweb.easybeans.tests.common.helper.EJBHelper.getBeanRemoteInstance; 30 31 import java.util.ArrayList ; 32 import java.util.List ; 33 34 import org.objectweb.easybeans.tests.common.ejbs.base.ItfCheck02; 35 import org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.sbinterface.SFSBSessionBeanItfWithAnnotation; 36 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.callbacklogger.ItfCallbackLoggerAccess; 37 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.callbacklogger.SLSBCallbackLoggerAccess; 38 import org.testng.annotations.BeforeMethod; 39 import org.testng.annotations.Test; 40 41 46 public class TestSFSessionBeanInterfaceWithAnnotation { 47 48 51 private ItfCheck02 bean; 52 53 56 private ItfCallbackLoggerAccess beanLogger; 57 58 62 @BeforeMethod 63 public void startUp() throws Exception { 64 bean = getBeanRemoteInstance(SFSBSessionBeanItfWithAnnotation.class, ItfCheck02.class); 65 beanLogger = getBeanRemoteInstance(SLSBCallbackLoggerAccess.class, ItfCallbackLoggerAccess.class); 66 beanLogger.deleteAll(); 67 } 68 69 76 public void verifyEjbActivate() throws Exception { 78 } 80 81 88 public void verifyEjbPassivate() throws Exception { 90 } 92 93 100 @Test 101 public void verifyEjbRemove() throws Exception { 102 bean.remove(); 103 104 Thread.sleep(SLEEP); 106 107 List <String > arLife = new ArrayList <String >(); 109 110 arLife.add(SFSBSessionBeanItfWithAnnotation.class.getName()); 111 112 beanLogger.verifyCallbackOrder(SFSBSessionBeanItfWithAnnotation.class, PRE_DESTROY, arLife 113 .toArray(new String [0])); 114 } 115 } 116 | Popular Tags |