Administration guide > Configure the deployment environment > Configuring cache integration > Configuring HTTP session managers
Configure the HTTP session manager for various application servers
WebSphere eXtreme Scale comes bundled with a session management implementation that overrides the default session manager for a web container and provides session replication, high availability, better scalability, and robust configuration options. You can enable the eXtreme Scale session replication manager and generic embedded ObjectGrid container startup.
Use the HTTP session manager with other application servers that are not running WebSphere Application Server, such as WebSphere Application Server Community Edition.
To configure other application servers to use the data grid, splice your application and incorporate WebSphere eXtreme Scale JAR files into the application.
Procedure
- Splice the application so that it can use the session manager.
To use the session manager, add the appropriate filter declarations to the web deployment descriptors for the application. In addition, session manager configuration parameters are passed in to the session manager in the form of servlet context initialization parameters in the deployment descriptors. There are three ways in which you can introduce this information into the application:
- addObjectGridFilter script
Use a command line script provided along with eXtreme Scale to splice an application with filter declarations and configuration in the form of servlet context initialization parameters. This script, objectgridRoot/session/bin/addObjectGridFilter.sh or objectgridRoot/session/bin/addObjectGridFilter.bat, takes two parameters: the absolute path to the application enterprise archive (EAR) file that to splice, and the absolute path to the splicer properties file that contains various configuration properties. The usage format of this script is...
addObjectGridFilter.bat [location of ear file] [location of properties file]
addObjectGridFilter.sh [location of ear file] [location of properties file]
Example using eXtreme Scale installed in a stand-alone directory on UNIX:
The servlet filter that is spliced in maintains defaults for configuration values. You can override these default values with configuration options that you specify in the properties file in the second argument. For a list of the parameters that you can use, see Servlet context initialization parameters.
- cd wxs_home/session/bin
- addObjectGridFilter.sh /tmp/mySessionTest.ear wxs_home/session/samples/splicer.properties
You can modify and use the sample splicer.properties file that is provided with the eXtreme Scale installation. You can also use the addObjectGridServlets script, which inserts the session manager by extending each servlet. However, the recommended script is the addObjectGridFilter script.
- Ant build script
WebSphere eXtreme Scale ships with a build.xml file that can be used by Apache Ant, which is included in the was_root/bin folder of a WebSphere Application Server installation. The build.xml can be modified to change the session manager configuration properties. The configuration properties are identical to the property names in the splicer.properties file. After the build.xml file has been modified, invoke the Ant process by running ant.sh, ws_ant.sh (UNIX) or ant.bat, ws_ant.bat (Windows).
- Update the web descriptor manually
Edit the web.xml file that is packaged with the web application to incorporate the filter declaration, its servlet mapping, and servlet context initialization parameters. Do not use this method because it is prone to errors.
For a list of the parameters that you can use, see Servlet context initialization parameters.
- Incorporate the WebSphere eXtreme Scale session replication manager JAR files into the application. You can embed the files into the application module WEB-INF/lib directory or in the application server classpath. The required JAR files vary depending on the type of containers that you are using:
- Remote container servers: ogclient.jar and sessionobjectgrid.jar
- Embedded container servers: objectgrid.jar and sessionobjectgrid.jar
- Optional: If you use remote container servers, start the container servers. See Start container processes for details.
- Deploy the application. Deploy the application with the normal set of steps for a server or cluster. After you deploy the application, you can start the application.
- Access the application. You can now access the application, which interacts with the session manager and WebSphere eXtreme Scale.
What to do next
You can change a majority of the configuration attributes for the session manager when you instrument the application to use the session manager. These attributes include variations to the replication type (synchronous or asynchronous), in-memory session table size, and so on. Apart from the attributes that can be changed at application instrumentation time, the only other configuration attributes that you can change after the application deployment are the attributes that are related to the WebSphere eXtreme Scale server cluster topology and the way that their clients (session managers) connect to them.
Parent topic:
Configure HTTP session managers
Related concepts
Related tasks
Configure HTTP session manager with WebSphere Portal
Configure the HTTP session manager with WAS
Related reference
XML files for HTTP session manager configuration
Servlet context initialization parameters