Developing a J2EE application to use ActivitySessions

This topic provides an overview of the high-level tasks for using ActivitySessions in J2EE applications.

About this task

Before you use ActivitySessions in J2EE applications, consider the following points:
  • An application that is accessed under an ActivitySession context can receive a javax.transaction.InvalidTransactionException RemoteException, thrown by the EJB container when servicing any application method. This exception occurs when an instance of an enterprise bean that has an ActivitySession-based activation policy becomes involved with concurrent global and local transactions.
  • To enable an enterprise bean to participate in an ActivitySession context and support ActivitySession-based operations, it must be configured with an ActivationPolicy of ACTIVITY_SESSION. A bean that is configured with ActivationPolicy of either TRANSACTION or ONCE cannot participate in an ActivitySession context.
  • A session bean can either use container-managed ActivitySessions or implement bean-managed ActivitySessions; entity beans can use only container-managed ActivitySessions. A bean is deployed to be bean-managed or container-managed with respect to ActivitySession management by setting its transaction type deployment attribute to be bean-managed or container-managed when you deploy the enterprise bean. A bean that uses bean-managed transactions can use bean-managed ActivitySessions; a bean that uses container-managed transactions can use container-managed ActivitySessions.
  • If you want a session bean or J2EE client to manage its own ActivitySessions, you must write the code that explicitly demarcates the boundaries of an ActivitySession, as described in Developing an enterprise bean or J2EE client to manage ActivitySessions.
The following high level tasks illustrate how to use an ActivitySession in a J2EE application:

Procedure

Example

For examples of using ActivitySessions in J2EE applications, see ActivitySessions samples



In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic    

Terms of Use | Feedback

Last updated: Aug 29, 2010 7:21:45 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=vela&product=was-nd-dist&topic=tas_scene
File name: tas_scene.html