Use the ActivitySession service

These topics provide information about implementing WebSphere enterprise applications that use ActivitySessions.

 

Overview

The ActivitySession service provides an alternative unit-of-work (UOW) scope to that provided by global transaction contexts. ActivitySessions provide a scoping mechanism for units of work, and both an ActivitySession and a transaction has the same following characteristics:

  • It can be bean-managed or container-managed

  • It can be distributed across application servers

  • It can be used as the context for managing EJB activation policy and lifecycle

An ActivitySession differs significantly from a transaction in the manner of its interaction with resource managers. An ActivitySession is used to scope or coordinate local transactions. That is, an ActivitySession can be used to request multiple one-phase resource managers to come to an application- or container-determined outcome. Unlike a transaction, an ActivitySession has no notion of a prepare phase or any notion of recovery at a service level.

The WebSphere EJB container and deployment tools support ActivitySessions as an extension to the J2EE programming model. Enterprise beans can be deployed with lifecycles that are influenced by ActivitySession context, as an alternative to transaction context. An enterprise bean with an ActivitySession-scoped lifecycle can participate in a resource manager local transaction (RMLT) that has a duration of the ActivitySession rather than an individual method on the bean (which is all that is possible under the standard J2EE model). Applications can then be composed of several enterprise beans with ActivitySession-based activation, with each bean participating in extended local transactions with one or more resource managers. At the end of the ActivitySession each of the local transactions can be directed to a common outcome by the ActivitySession manager.

One can configure the WebSphere containers and deployable applications to support enterprise beans that operate under application- or container-initiated ActivitySessions rather than, or in addition to, transactions.

For more information about implementing WebSphere enterprise applications that use ActivitySessions, see the following topics:

 

See also


The ActivitySession service
Developing a J2EE application to use an ActivitySession
Developing an enterprise bean or J2EE client to manage ActivitySessions
Configuring EJB module ActivitySession deployment attributes
Configuring Web module ActivitySession deployment attributes
Disable or enabling the ActivitySession service
Configuring the default ActivitySession timeout
Troubleshooting ActivitySessions
The ActivitySession service programming interfaces
ActivitySessions samples
ActivitySessions: Resources for learning