1 25 package org.objectweb.easybeans.tests.common.ejbs.stateful.containermanaged.ejb2view; 26 27 import java.rmi.RemoteException ; 28 29 import javax.ejb.CreateException ; 30 import javax.ejb.EJB ; 31 import javax.ejb.EJBException ; 32 import javax.ejb.Init ; 33 import javax.ejb.Local ; 34 import javax.ejb.LocalHome ; 35 import javax.ejb.Remote ; 36 import javax.ejb.RemoteHome ; 37 import javax.ejb.SessionBean ; 38 import javax.ejb.SessionContext ; 39 import javax.ejb.Stateful ; 40 41 import org.objectweb.easybeans.tests.common.ejbs.entity.callbacklogger.CallbackType; 42 import org.objectweb.easybeans.tests.common.ejbs.stateless.containermanaged.callbacklogger.ItfCallbackLoggerAccess; 43 44 50 @Stateful (name = "SimpleEjb2LifecycleBean") 51 @Remote (SimpleEjb2.class) 52 @Local (SimpleEjb2Local.class) 53 @RemoteHome (SimpleEjb2Home.class) 54 @LocalHome (SimpleEjb2LocalHome.class) 55 public class SimpleEjb2LifecycleBean extends SimpleEjb2BeanBase implements SessionBean { 56 57 60 private static final long serialVersionUID = 3594789527580608168L; 61 62 65 @EJB (beanName = "SLSBCallbackLoggerAccess") 66 private ItfCallbackLoggerAccess clBean; 67 68 75 @Override 76 @Init 77 public void init(final int code, final String name) throws CreateException , RemoteException { 78 super.init(code, name); 79 } 80 81 87 @Override 88 @Init 89 void init(final String name) throws CreateException { 90 super.init(name); 91 } 92 93 98 public void ejbActivate() throws EJBException , RemoteException { 99 } 101 102 107 public void ejbPassivate() throws EJBException , RemoteException { 108 110 } 111 112 117 public void ejbRemove() throws EJBException , RemoteException { 118 clBean.insertCallbackLogger(this.getClass().getName(), CallbackType.PRE_DESTROY, this.getClass().getName()); 119 } 120 121 127 public void setSessionContext(final SessionContext arg0) throws EJBException , RemoteException { 128 129 } 130 } 131 | Popular Tags |