javax.ejb

Interface SessionBean

All Superinterfaces:
EnterpriseBean, Serializable
Known Subinterfaces:
SmartSessionBean
Known Implementing Classes:
AbstractStatefulSessionBean, AbstractStatelessSessionBean, ConverterEJB

public interface SessionBean
extends EnterpriseBean

The main ejb context.

Method Summary

void
ejbActivate()
void
ejbPassivate()
void
ejbRemove()
void
setSessionContext(SessionContext ctx)

Method Details

ejbActivate

public void ejbActivate()
            throws EJBException,
                   RemoteException
Usages and Demos :

View More Examples of ejbActivate()
   1: import java.util.HashMap;
   2: import javax.ejb.SessionBean;
   3: 
   4:         ...
   5:     public void activateObject(Object key, Object obj) throws Exception {
   6:     SessionBean sb = (SessionBean)obj;
   7:         ...
   8:     sb.ejbActivate();
   9:   }

View Full Code Here
   1: import java.util.HashMap;
   2: import javax.ejb.SessionBean;
   3: 
   4:         ...
   5:     public void activateObject(Object key, Object obj) throws Exception {
   6:     SessionBean sb = (SessionBean)obj;
   7:         ...
   8:     sb.ejbActivate();
   9:   }

View Full Code Here
   1: import javax.ejb.EnterpriseBean;
   2: import javax.ejb.SessionBean;
   3: import javax.ejb.EJBException;
   4:         ...
   5: 
   6:   public void ejbActivate(SessionBean bean) throws EJBException, RemoteException {
   7:     logger.debug(bean + " activate");
   8:         ...
   9:     bean.ejbActivate();
  10:   }
  11:         ...
  12: 
  13:   public void ejbPassivate(SessionBean bean) throws EJBException, RemoteException {

View Full Code Here
   1: import javax.ejb.RemoveException;
   2: import javax.ejb.SessionBean;
   3: import javax.ejb.SessionContext;
   4:         ...
   5: 
   6:     public void ejbActivate(SessionBean bean) throws EJBException, RemoteException {
   7:         logger.debug(bean + " activate");
   8:         ...
   9:         bean.ejbActivate();
  10:     }
  11:         ...
  12: 
  13:     public void ejbPassivate(SessionBean bean) throws EJBException, RemoteException {

View Full Code Here
   1: import javax.ejb.EJBException;
   2: import javax.ejb.SessionBean;
   3: import javax.ejb.RemoveException;
   4:         ...
   5:             
   6:       SessionBean bean = (SessionBean) ctx.getInstance();
   7:         ...
   8:       bean.ejbActivate();

View Full Code Here

ejbPassivate

public void ejbPassivate()
            throws EJBException,
                   RemoteException
Usages and Demos :

View More Examples of ejbPassivate()
   1: import java.util.HashMap;
   2: import javax.ejb.SessionBean;
   3: 
   4:         ...
   5:     public void activateObject(Object key, Object obj) throws Exception {
   6:     SessionBean sb = (SessionBean)obj;
   7:     sb.ejbActivate();
   8:         ...
   9:     SessionBean sb = (SessionBean)obj;
  10:     sb.ejbPassivate();
  11:   }

View Full Code Here
   1: import java.util.HashMap;
   2: import javax.ejb.SessionBean;
   3: 
   4:         ...
   5:     public void activateObject(Object key, Object obj) throws Exception {
   6:     SessionBean sb = (SessionBean)obj;
   7:     sb.ejbActivate();
   8:         ...
   9:     SessionBean sb = (SessionBean)obj;
  10:     sb.ejbPassivate();
  11:   }

View Full Code Here
   1: import javax.ejb.EnterpriseBean;
   2: import javax.ejb.SessionBean;
   3: import javax.ejb.EJBException;
   4:         ...
   5: 
   6:   public void ejbActivate(SessionBean bean) throws EJBException, RemoteException {
   7:     logger.debug(bean + " activate");
   8:         ...
   9: 
  10:   public void ejbPassivate(SessionBean bean) throws EJBException, RemoteException {
  11:     logger.debug(bean + " passivate");
  12:         ...
  13:     bean.ejbPassivate();

View Full Code Here
   1: import javax.ejb.RemoveException;
   2: import javax.ejb.SessionBean;
   3: import javax.ejb.SessionContext;
   4:         ...
   5: 
   6:     public void ejbActivate(SessionBean bean) throws EJBException, RemoteException {
   7:         logger.debug(bean + " activate");
   8:         ...
   9: 
  10:     public void ejbPassivate(SessionBean bean) throws EJBException, RemoteException {
  11:         logger.debug(bean + " passivate");
  12:         ...
  13:         bean.ejbPassivate();

View Full Code Here
   1: import javax.ejb.EJBException;
   2: import javax.ejb.SessionBean;
   3: import javax.ejb.RemoveException;
   4:         ...
   5:             
   6:       SessionBean bean = (SessionBean) ctx.getInstance();
   7:       bean.ejbActivate();
   8:         ...
   9:       SessionBean bean = (SessionBean) ctx.getInstance();
  10:       bean.ejbPassivate();
  11:   

View Full Code Here

ejbRemove

public void ejbRemove()
            throws EJBException,
                   RemoteException
Usages and Demos :

View More Examples of ejbRemove()
   1: import java.util.HashMap;
   2: import javax.ejb.SessionBean;
   3: 
   4:         ...
   5:     public void activateObject(Object key, Object obj) throws Exception {
   6:     SessionBean sb = (SessionBean)obj;
   7:     sb.ejbActivate();
   8:         ...
   9:     SessionBean sb = (SessionBean)obj;
  10:     sb.ejbRemove();
  11:   }

View Full Code Here
   1: import java.util.HashMap;
   2: import javax.ejb.SessionBean;
   3: 
   4:         ...
   5:     public void activateObject(Object key, Object obj) throws Exception {
   6:     SessionBean sb = (SessionBean)obj;
   7:     sb.ejbActivate();
   8:         ...
   9:     SessionBean sb = (SessionBean)obj;
  10:     sb.ejbRemove();
  11:   }

View Full Code Here
   1: import javax.ejb.HomeHandle;
   2: import javax.ejb.SessionBean;
   3: 
   4:         ...
   5:     try {
   6:       SessionBean sb = (SessionBean)obj;
   7:         ...
   8:       sb.ejbRemove();
   9:     }

View Full Code Here
   1: import javax.ejb.HomeHandle;
   2: import javax.ejb.SessionBean;
   3: 
   4:         ...
   5:     try {
   6:       SessionBean sb = (SessionBean)obj;
   7:         ...
   8:       sb.ejbRemove();
   9:     }

View Full Code Here
   1: import javax.ejb.EnterpriseBean;
   2: import javax.ejb.SessionBean;
   3: import javax.ejb.EJBException;
   4:         ...
   5: 
   6:   public void ejbActivate(SessionBean bean) throws EJBException, RemoteException {
   7:     logger.debug(bean + " activate");
   8:         ...
   9: 
  10:   public void ejbPassivate(SessionBean bean) throws EJBException, RemoteException {
  11:     logger.debug(bean + " passivate");
  12:         ...
  13:     logger.debug(bean + " remove");
  14:     bean.ejbRemove();

View Full Code Here

setSessionContext

public void setSessionContext(SessionContext ctx)
            throws EJBException,
                   RemoteException
Usages and Demos :

View More Examples of setSessionContext(SessionContext ctx)
   1: import javax.ejb.EnterpriseBean;
   2: import javax.ejb.SessionBean;
   3: import javax.ejb.EJBException;
   4:         ...
   5: 
   6:   public void ejbActivate(SessionBean bean) throws EJBException, RemoteException {
   7:     logger.debug(bean + " activate");
   8:         ...
   9: 
  10:   public void ejbPassivate(SessionBean bean) throws EJBException, RemoteException {
  11:     logger.debug(bean + " passivate");
  12:         ...
  13:     logger.debug(bean + " setSessionContext");
  14:     bean.setSessionContext(ctx);

View Full Code Here
   1: import javax.ejb.RemoveException;
   2: import javax.ejb.SessionBean;
   3: import javax.ejb.SessionContext;
   4:         ...
   5: 
   6:     public void ejbActivate(SessionBean bean) throws EJBException, RemoteException {
   7:         logger.debug(bean + " activate");
   8:         ...
   9: 
  10:     public void ejbPassivate(SessionBean bean) throws EJBException, RemoteException {
  11:         logger.debug(bean + " passivate");
  12:         ...
  13:         logger.debug(bean + " setSessionContext");
  14:         bean.setSessionContext(ctx);

View Full Code Here
   1: 
   2: import javax.ejb.SessionBean;
   3: import javax.ejb.SessionContext;
   4:         ...
   5: 
   6:         SessionBean bean = null;
   7:         try {
   8:         ...
   9:             bean = (SessionBean) beanClass.newInstance();
  10:         } catch (Exception e) {
  11:         ...
  12:         try {
  13:             bean.setSessionContext((SessionContext) ctx.getEJBContext());

View Full Code Here
   1: 
   2: import javax.ejb.SessionBean;
   3: import javax.ejb.SessionContext;
   4:         ...
   5: 
   6:         SessionBean bean = null;
   7:         try {
   8:         ...
   9:             bean = (SessionBean) beanClass.newInstance();
  10:         } catch (Exception e) {
  11:         ...
  12:         try {
  13:             bean.setSessionContext((SessionContext) ctx.getEJBContext());

View Full Code Here