Configuring the Java Web Application

After installing and configuring the in-memory data grid, you can perform the following steps to use the ScaleOut StateServer in-memory data grid as a Session Provider for Java web servers following the Java Servlet 2.5 and 3.0 specification.

  1. Copy the java_api/session_provider/soss-sessionprovider-5.7.jar JAR and the java_api/soss-jnc-5.7.jar JAR into the application’s WEB-INF/lib directory.
  2. Copy all the JARs from java_api/lib (JavaApi on Windows) into the application’s WEB-INF/lib directory.
  3. Set the following configuration parameters in the application’s WEB-INF/web.xml configuration file (this will set the name of the NamedCache instance):
...
<filter>
   <filter-name>SossHttpFilter</filter-name>
   <filter-class>com.scaleoutsoftware.soss.http.websession.SossHttpFilter</filter-class>
</filter>

<filter-mapping>
        <filter-name>SossHttpFilter</filter-name>
        <url-pattern>/*</url-pattern>
</filter-mapping>

<context-param>
        <param-name>SossAppName</param-name>
        <param-value>YourApplicationName</param-value>
</context-param>
...
[Note] Note

The SossAppName parameter should be unique across applications which store sessions in the ScaleOut StateServer in-memory data grid.

Optionally, you can enable/disable session locking by using the following parameter (by default, session locking is enabled):

<context-param>
        <param-name>SossSessionLocking</param-name>
        <param-value>false</param-value>
</context-param>