Class AbstractSessionBean

  extended by
      extended by
All Implemented Interfaces:
Serializable, EnterpriseBean, SessionBean, SmartSessionBean
Direct Known Subclasses:
AbstractStatefulSessionBean, AbstractStatelessSessionBean

abstract class AbstractSessionBean
extends AbstractEnterpriseBean
implements SmartSessionBean

Superclass for all session beans. Not intended for direct client subclassing; derive from AbstractStatelessSessionBean or AbstractStatefulSessionBean instead.

This class saves the session context provided by the EJB container in an instance variable and provides a NOP implementation of the ejbRemove() lifecycle method.

Rod Johnson
See Also:
AbstractStatelessSessionBean, AbstractStatefulSessionBean

Field Summary
Fields inherited from class
Constructor Summary
Method Summary
 SessionContext getSessionContext()
          Convenience method for subclasses.
 void setSessionContext(SessionContext sessionContext)
          Set the session context.
Methods inherited from class
ejbRemove, getBeanFactory, loadBeanFactory, onEjbRemove, setBeanFactoryLocator, setBeanFactoryLocatorKey, unloadBeanFactory
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.ejb.SessionBean
ejbActivate, ejbPassivate, ejbRemove

Constructor Detail


Method Detail


public void setSessionContext(SessionContext sessionContext)
Set the session context.

If overriding this method, be sure to invoke this form of it first.

Specified by:
setSessionContext in interface SessionBean
sessionContext - SessionContext context for session


public final SessionContext getSessionContext()
Convenience method for subclasses. Return the EJB context saved on initialization.

Specified by:
getSessionContext in interface SmartSessionBean
the SessionContext saved on initialization by this class's implementation of the setSessionContext() method.

Copyright (c) 2002-2007 The Spring Framework Project.