Installing Coherence*Web Session Management Module

Applies to Coherence 3.0 or later

Please note that the following installation documentation applies to the Coherence*Web module in Coherence release 3.0 or later. This Session Management Module is very different and much more comprehensive than the module provided with Coherence releases prior to Release 2.3. Since we chose to not include the previous version's module jars and documentation in release 2.3 to avoid confusion, if you are looking for information on how to install pre-Release 2.3 module, please refer to the documentation and the User Guide included with the doc directory of the software distribution for the release level you are installing.

Coherence*Web Session Management Module: Supported Web Containers

The following table summarizes the web containers that are currently supported by the Coherence*Web Session Management Module and the installation information specific to each supported web container. For detailed installation instructions for a particular web container, click on its name.

Application Server Patch Utility Class1 Server Type Alias2
Apache Tomcat 4.1.x N/A Tomcat/4.1.x
Apache Tomcat 5.0.x N/A Tomcat/5.0.x
Apache Tomcat 5.5.x N/A Tomcat/5.5.x
BEATM WebLogicTM 8.x com.tangosol.coherence.servlet.weblogic81.ApplyPatch WebLogic/8.x
BEATM WebLogicTM Portal 8.x com.tangosol.coherence.servlet.weblogic81.ApplyPatch WebLogic/Portal/8.x
Caucho Resin® 3.0.x com.tangosol.coherence.servlet.resin30.ApplyPatch Resin/3.0.x
IronFlare Orion 2.0.x N/A Orion/2.0.x
IBM® WebSphereTM 5.x N/A WebSphere/5.x
Jetty 4.2.14 and later N/A Jetty/4.2+
New Atlanta ServletExec® 5.0 N/A ServletExec/5.x
Oracle® OC4J 10.1.x com.tangosol.coherence.servlet.oracle101.ApplyPatch Oracle/10.1.x
SunTM ONE 6.1 and 7 N/A SunONE

Notes:
1 The name of the Java utility class used to patch web container libraries so that Coherence*Web can tightly integrate with the target web container.
2 The server type alias passed to the Coherence*Web installer via the -server command line option.

General Instructions for Installing Coherence*Web Session Management Module

To enable Coherence*Web in your J2EE application, you need to run a ready to deploy application (recommended) through the automated installer prior to deploying it. The automated installer prepares the application for deployment.

To install Coherence*Web for the J2EE application you are deploying:

Installing Coherence*Web Session Management Module on BEATM WebLogicTM 8.x

The following are additional steps to take when installing the Coherence*Web Session Management Module into a BEA WebLogic 8.x server:

Installing Coherence*Web Session Management Module on BEATM WebLogicTM Portal 8.x

The following are additional steps to take when installing the Coherence*Web Session Management Module into a BEA WebLogic Portal 8.x server:

Installing Coherence*Web Session Management Module on Caucho Resin® 3.0.x

The following are additional steps to take when installing the Coherence*Web Session Management Module into a Caucho Resin server:

Installing Coherence*Web Session Management Module on Oracle® OC4J 10.1.x

The following are additional steps to take when installing the Coherence*Web Session Management Module into a Oracle OC4J server:

How the Coherence*Web Installer instruments a J2EE application

During the inspect step, the Coherence*Web Installer performs the following tasks:

  1. Generate a template coherence-web.xml configuration file that contains basic information about the application and target web container along with a set of default Coherence*Web configuration context parameters appropriate for the target web container. If an existing coherence-web.xml configuration file exists (for example, from a previous run of the Coherence*Web Installer), the context parameters in the existing file are merged with those in the generated template.
  2. Enumerate the JSPs from each web application in the target J2EE application and add information about each JSP to the coherence-web.xml configuration file.
  3. Enumerate the TLDs from each web application in the target J2EE application and add information about each TLD to the coherence-web.xml configuration file.

During the install step, the Coherence*Web Installer performs the following tasks:

  1. Create a backup of the original J2EE application so that it can be restored during the uninstall step.
  2. Add the Coherence*Web configuration context parameters generated in step (1) of the inspect step to the web.xml descriptor of each web application contained in the target J2EE application.
  3. Unregister any application-specific ServletContextListener, ServletContextAttributeListener, ServletRequestListener, ServletRequestAttributeListener, HttpSessionListener, and HttpSessionAttributeListener classes (including those registered by TLDs) from each web application.
  4. Register a Coherence*Web ServletContextListener in each web.xml descriptor. At runtime, the Coherence*Web ServletContextListener will propagate each ServletContextEvent to each application-specific ServletContextListener.
  5. Register a Coherence*Web ServletContextAttributeListener in each web.xml descriptor. At runtime, the Coherence*Web ServletContextAttributeListener will propagate each ServletContextAttributeEvent to each application-specific ServletContextAttributeListener.
  6. Wrap each application-specific Servlet declared in each web.xml descriptor with a Coherence*Web SessionServlet. At runtime, each Coherence*Web SessionServlet will delegate to the wrapped Servlet.
  7. Add the following directive to each JSP enumerated in step (2) of the inspect step: <%@ page extends="com.tangosol.coherence.servlet.api22.JspServlet" %>

During the uninstall step, the Coherence*Web Installer replaces the instrumented J2EE application with the backup of the original version created in step (1) of the install process.

Testing HTTP session management (without a dedicated loadbalancer)

Coherence comes with a light-weight software load balancer; it is only intended for testing purposes. The load balancer is very useful when testing functionality such as Session Management and is very easy to use.