Interface SessionContextExtension

All Superinterfaces:
jakarta.ejb.EJBContext, EJBContextExtension, jakarta.ejb.SessionContext

public interface SessionContextExtension extends jakarta.ejb.SessionContext, EJBContextExtension
The SessionContextExtension interface may be used by a Session EJB to invoke WebSphere-specific EJB Container services.

A Session EJB may invoke the SessionContextExtension methods by casting the context object passed into the EJB's setSessionContext() method, to com.ibm.websphere.ejbcontainer.SessionContextExtension. Typically the code in setSessionContext() assigns the context object to a bean instance variable for later use by other bean methods.

In WebSphere, all jakarta.ejb.SessionContext objects also implement this interface. This allows the bean to use a single 'context' instance variable (of type SessionContextExtension) and be able to invoke EJB specification-defined methods as well as WebSphere-defined methods on the same context object. It is also possible, of course, to assign the context object to two instance variables, one of type jakarta.ejb.SessionContext and another of type com.ibm.websphere.ejbcontainer.SessionContextExtension.

Note: Some of the methods on this interface may result in behavior not compliant with the official EJB specification. If this is the case, the documentation for that method will indicate so.

Since:
WAS 6.0.2
See Also:
  • Method Summary

    Methods inherited from interface jakarta.ejb.EJBContext

    getCallerIdentity, getCallerPrincipal, getContextData, getEJBHome, getEJBLocalHome, getEnvironment, getRollbackOnly, getTimerService, getUserTransaction, isCallerInRole, isCallerInRole, lookup, setRollbackOnly

    Methods inherited from interface com.ibm.websphere.ejbcontainer.EJBContextExtension

    isTransactionGlobal

    Methods inherited from interface jakarta.ejb.SessionContext

    getBusinessObject, getEJBLocalObject, getEJBObject, getInvokedBusinessInterface, getMessageContext, wasCancelCalled