WebSphere Application Server Network Deployment, Version 6.0.x   Operating Systems: AIX, HP-UX, Linux, Solaris, Windows
             [TIP: Focusing the table of contents and search results]

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

You should consider the following points before using ActivitySessions in J2EE applications:
  • 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 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 only use 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 deploying 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



Related concepts
The ActivitySession service
ActivitySession service application programming interfaces
ActivitySession and transaction contexts
Related tasks
Developing an enterprise bean or J2EE client to manage ActivitySessions
Setting Web module ActivitySession deployment attributes
Using the ActivitySession service
Setting EJB module ActivitySession deployment attributes
Related reference
Samples: ActivitySessions
Usage model for using ActivitySessions with HTTP sessions
ActivitySession and transaction container policies in combination
Task topic    

Terms of Use | Feedback

Last updated: Mar 8, 2007 8:14:28 PM CST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ass/tasks/tas_scene.html

© Copyright IBM Corporation 2002, 2006. All Rights Reserved.
This information center is powered by Eclipse technology. (http://www.eclipse.org)