Sharing HTTP sessions between multiple Web modules in the same enterprise application
 Technote (FAQ)
 
Problem
WebSphere® Application Server V4.04 provides a new feature that you can use to extend the scope of the session to an enterprise application. By default, WebSphere Application Server is compliant to the servlet 2.2 specification and does not allow the sharing of session objects across Web modules. This new feature allows the session object to be shared by all Web modules within the same enterprise application.
 
Solution

Follow these steps to activate this feature:

  1. Create a file called sessionshare.xml file under the WebSphere-Root/properties directory.
  2. Add the following tags in the sessionshare.xml file:

    <sessionsharing>
    <EnterpriseAppnames> (Add Enterprise Application Display Names separated by commas)
    </EnterpriseAppnames>
    </sessionsharing>
  3. Restart the Application Server. The Session Manager reads the sessionshare.xml file by default and enables the session sharing feature for the enterprise applications listed there.

Note: Nothing additional needs to be done to enable this feature other than adding sessionshare.xml file and listing the names of the enterprise applications in it.

To use this service, all the Web modules in the enterprise application must be installed on the same Application Server. In configurations where multiple Web modules are installed on different Application Servers, applications might be able to share the session data across Web modules using persistent sessions. However, session data integrity is lost when concurrent access to a session is made by different Web modules. This also severely restricts usage of some SessionManger features like TIME_BASED_WRITES for write frequency.

 
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Sessions and Session Management
Operating system(s): HP-UX
Software version: 4.0.7
Software edition:
Reference #: 1110785
IBM Group: Software Group
Modified date: Jul 30, 2004