An application can use the ActivitySession service of WebSphere(R) Business Integration Server Foundation to improve EJB performance. The ActivitySession service extends the local transaction containment (LTC) boundary by allowing the ActivitySession to be the scoping boundary instead of the bean method. This enables all of the EJB instances within the unit of work to remain active and ready for use. Both stateful and stateless session beans with container managed persistence (CMP) can use the ActivitySession service.
An HTTPSession can have an associated ActivitySession. When this occurs, the LTC boundary extends beyond one HTTPRequest to the entire HTTP client session. This also sets the EJB life cycle to the life cycle of the HTTPSession. For example, the default logon process (see default processes in the Business Process Component) creates an HTTPSession with an associated ActivitySession when the user logs on. With the LTC scoping provided by the ActivitySession, all of the EJBs used within the HTTPSession remain available throughout the session. When the user invokes the default logout process or when the HTTPSession times out, the associated ActivitySession stops. The system then cleans up all of the EJBs held by the ActivitySession.
The ActivitySession operates in automatic mode or in user-defined mode. In automatic mode, the ActivitySession has a long life within the HTTPSession. The advantage of this mode is that there is no additional requirements other than you must use the WebSphere Application Server Toolkit to deploy the files. In user-defined mode, you must write code in the application to manually control when the ActivitySession starts and stops. The benefit for using this mode is better performance and memory cost.
For more information, see ActivitySession service in the WebSphere Business Integration Server Foundation help.