[Version 5.0.2]Setting ActivitySession deployment attributes for a Web application

Use this task to set the ActivitySession deployment attributes for a Web application to start UserActivitySessions and perform work scoped within ActivitySessions.

Why and when to perform this task

You can configure the deployment attributes of an application by using the Deployment Descriptor Editor of WebSphere Studio Application Developer or the Application Assembly Tool.

To set the ActivitySession deployment attributes for a Web application, use the Application Assembly Tool to complete the following steps:

Steps for this task

  1. Launch the Application Assembly Tool.
  2. Create or edit the Web module.
    For example, to change attributes of an existing module, click File-> Open then select the archive file for the module.
  3. In the navigation pane, expand web_application-> Web Components then select the servlet instance.
    A property dialog box for the servlet instance is displayed in the property pane.
  4. In the property pane, select the WAS Enterprise tab.
    This displays the Enterprise properties in the property pane.
  5. Set the ActivitySession control kind attribute to either Application, Container, or None.
    Application
    The Web application is responsible for starting and ending ActivitySessions, as follows:
    • If an HttpSession is active when an application begins an ActivitySession, then the container associates the ActivitySession with the HttpSession.
    • If an ActivitySession is started in the absence of an HttpSession, then the application must ensure it is completed before the dispatched method completes; otherwise, an exception results.
    • If an HttpSession is associated with a request dispatched to an application with this ActivitySession control value, and if that HttpSession has an ActivitySession associated with it, then the container dispatches the request in the context of that ActivitySession. For example, the container resumes the ActivitySession context onto the thread before the dispatch.
    • A Web application can use both transactions and ActivitySessions. Any transactions started within the scope of an ActivitySession must be ended by the web component that started them and within the same request dispatch.
    Container
    A servlet has no access to UserActivitySessions. Any HttpSession started by the servlet has an ActivitySession automatically associated with it by the container, and this ActivitySession is put onto the thread of execution. If such a servlet is dispatched by a request that has an HttpSession containing no ActivitySession, then the container starts an ActivitySession and associates it with the HttpSession and the thread.

    A Web application can use both transactions and ActivitySessions. Any transactions started within the scope of an ActivitySession must be ended by the web component that started them and within the same request dispatch.

    None
    A servlet has no access to UserActivitySessions, and no participation in an ActivitySession is tolerated. Any HttpSession containing an ActivitySession that is associated with a request dispached on such a servlet is rejected with a ServletException.
  6. To apply the changes and close the Application Assembly Tool, click OK. Otherwise, to apply the values but keep the property dialog open for additional edits, click Apply.
  7. To see changes reflected in your application, regenerate deployment code and re-install the deployable archive.

Related concepts
The ActivitySession service
Related tasks
Developing a J2EE application to use ActivitySessions



Searchable topic ID:   tas_depweb
Last updated: Jun 21, 2007 8:07:48 PM CDT    WebSphere Business Integration Server Foundation, Version 5.0.2
http://publib.boulder.ibm.com/infocenter/wasinfo/index.jsp?topic=/com.ibm.wasee.doc/info/ee/ass/tasks/tas_depweb.html

Library | Support | Terms of Use | Feedback