+

Search Tips   |   Advanced Search

 

Learn about ActivitySessions

 

Find links to Web resources for learning, including conceptual overviews, tutorials, samples, and "How do I?..." topics, pending their availability.

 

How do I?...

  Develop and assemble applications that use ActivitySessions

Checkmark

Use ActivitySessions with HTTP sessions

Checkmark

Develop a J2EE application to use an ActivitySession

Checkmark

Develop an enterprise bean or J2EE client to manage ActivitySessions

Checkmark

Set EJB module ActivitySession deployment attributes
  Deploy and administer your applications

Checkmark

Deploy applications (same as any application type)

Checkmark

Disable or enable ActivitySessions

Checkmark

Set the default ActivitySession timeout for an appserver

Checkmark

Administer applications (same as any application)
  Troubleshoot ActivitySessions

Checkmark

Troubleshoot ActivitySessions

 

Conceptual overviews

Documentation Documentation

The ActivitySession service
   

 

Tutorials

Tutorials are not available at this time.

 

Samples

Samples

The Samples Gallery offers:

     

  • Http session association (MasterMind)

    A servlet provides the user interface for a game called MasterMind. The game uses an HTTP session to control the ActivitySession lifecycle, and talks to an enterprise bean, which holds the state and provides the logic for the game. The aim of the game is to guess the four-element code that is generated at the start. On each guess, clues are given to the identity of the target code by how many elements in the guess are present in the target and how many of these elements are correctly placed.

     

  • Container-managed ActivitySessions

    This Sample consists of a client, which begins and ends an ActivitySession, updating an entity bean. The sample demonstrates client access to the UserActivitySession interface, container-managed ActivitySessions and container resolution of resource-managed local transactions. These transactions start within the enterprise beans that have a local transaction containment (LTC) boundary of ActivitySession. The client verifies that updates to bean instances are committed when the ActivitySession is completed with the EndModeCheckpoint and rolled back when the EndModeReset is used.

     

  • Bean-managed ActivitySessions

    This Sample consists of a client that invokes a method on a stateless session bean. This session bean uses bean-managed ActivitySessions, beginning and ending the ActivitySessions with the UserActivitySession interface. During these ActivitySessions, a stateful session bean is accessed. This stateful session bean, which uses container-managed ActivitySessions, an LTC boundary of ActivitySession, and an LTC resolution control of application, is called several times to update data in a database. Sometimes the stateful session bean is instructed to complete the resource manager local transactions (RMLTs), either to commit them or roll them back. Sometimes the RMLTs are left incomplete. The stateless session bean then completes the ActivitySession and reports back to the client whether the results are consistent with the expected behavior.