AbstractSessionBean (Spring Framework 3.2.1.RELEASE API)
Date: 2013-01-24

org.springframework.ejb.support

## Class AbstractSessionBean

- java.lang.Object
- - org.springframework.ejb.support.AbstractEnterpriseBean
  - - org.springframework.ejb.support.AbstractSessionBean

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

  Deprecated.
  as of Spring 3.2, in favor of implementing EJBs in EJB 3 style

      @Deprecated
      public abstract class AbstractSessionBean
      extends AbstractEnterpriseBean
      implements SmartSessionBean

  Base class for Spring-based EJB 2.x session beans. Not intended for direct subclassing: Extend `AbstractStatelessSessionBean` or `AbstractStatefulSessionBean` instead.

  This class saves the session context provided by the EJB container in an instance variable and exposes it through the `SmartSessionBean` interface.

  Author:
    Rod Johnson, Juergen Hoeller
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class org.springframework.ejb.support.AbstractEnterpriseBean

      `BEAN_FACTORY_PATH_ENVIRONMENT_KEY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractSessionBean()` Deprecated.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `SessionContext` | `getSessionContext()` Deprecated. Convenience method for subclasses, returning the EJB session context saved on initialization (`setSessionContext(javax.ejb.SessionContext)`).
    `void` | `setSessionContext(SessionContext sessionContext)` Deprecated. Set the session context for this EJB.

    - ### Methods inherited from class org.springframework.ejb.support.AbstractEnterpriseBean

      `ejbRemove, getBeanFactory, onEjbRemove, setBeanFactoryLocator, setBeanFactoryLocatorKey`

    - ### 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

    - #### AbstractSessionBean

          public AbstractSessionBean()

      Deprecated.

  - ### Method Detail

    - #### setSessionContext

          public void setSessionContext(SessionContext sessionContext)

      Deprecated.
      Set the session context for this EJB.

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

      Specified by:
        `setSessionContext` in interface `SessionBean`

    - #### getSessionContext

          public final SessionContext getSessionContext()

      Deprecated.
      Convenience method for subclasses, returning the EJB session context saved on initialization (`setSessionContext(javax.ejb.SessionContext)`).
      Specified by:
        `getSessionContext` in interface `SmartSessionBean`