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. |
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.
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:
java -jar webInstaller.jar <app-path> -inspect -server:<server-type>
A successful result of this step is the creation (or an update, if it already exists) of the coherence-web.xml configuration descriptor file for your J2EE application in the directory where the application is located. This configuration descriptor contains the default Coherence*Web settings for your application that the installer suggests be used in the following install step. You may at this point proceed to the install step, or review and modify the settings to fit them to your requirements prior to running the install step (which would make the install step use your modified settings). For example, you can enable certain features by setting the "context-param" options in the coherence-web.xml configuration descriptor:
param-name | coherence-servletcontext-clustered |
param-value | true |
param-name | coherence-enable-sessioncontext |
param-value | true |
param-name | coherence-session-id-length |
param-value | 32 |
param-name | coherence-session-urlencode-enabled |
param-value | true |
After double-checking that these changes have been made, save the file and exit the editor; remember to return back to the Tangosol library directory if you are working from a shell or command line.
java -jar webInstaller.jar <app-path> -install
Please note that the installer expects to find the valid coherence-web.xml configuration descriptor for its use in the same directory the application is located.
The following are additional steps to take when installing the Coherence*Web Session Management Module into a BEA WebLogic 8.x server:
jar -xvf webInstaller.jar web-install/coherence-web.jar
This will extract the coherence-web.jar file into a sub-directory named web-install. On Windows, use the following commands to move the coherence-web.jar file up one level into the library directory:
move web-install\coherence-web.jar . rmdir web-install
On Unix:
mv web-install/coherence-web.jar . rmdir web-install
java -cp tangosol.jar;coherence.jar;coherence-web.jar com.tangosol.coherence.servlet.weblogic81.ApplyPatch <wls-lib-path>
For example, on Windows:
java -cp tangosol.jar;coherence.jar;coherence-web.jar com.tangosol.coherence.servlet.weblogic81.ApplyPatch C:\bea\weblogic81\server\lib
The following are additional steps to take when installing the Coherence*Web Session Management Module into a BEA WebLogic Portal 8.x server:
jar -xvf webInstaller.jar web-install/coherence-web.jar
This will extract the coherence-web.jar file into a sub-directory named web-install. On Windows, use the following commands to move the coherence-web.jar file up one level into the library directory:
move web-install\coherence-web.jar . rmdir web-install
On Unix:
mv web-install/coherence-web.jar . rmdir web-install
java -cp tangosol.jar;coherence.jar;coherence-web.jar com.tangosol.coherence.servlet.weblogic81.ApplyPatch <wls-lib-path>
For example, on Windows:
java -cp tangosol.jar;coherence.jar;coherence-web.jar com.tangosol.coherence.servlet.weblogic81.ApplyPatch C:\bea\weblogic81\server\lib
<servlet-filters-for-skeleton-jsps enable="true"/>
The following are additional steps to take when installing the Coherence*Web Session Management Module into a Caucho Resin server:
jar -xvf webInstaller.jar web-install/coherence-web.jar
This will extract the coherence-web.jar file into a sub-directory named web-install. On Windows, use the following commands to move the coherence-web.jar file up one level into the library directory:
move web-install\coherence-web.jar . rmdir web-install
On Unix:
mv web-install/coherence-web.jar . rmdir web-install
java -cp tangosol.jar;coherence.jar;coherence-web.jar com.tangosol.coherence.servlet.resin30.ApplyPatch
For example, on Windows:
java -cp tangosol.jar;coherence.jar;coherence-web.jar com.tangosol.coherence.servlet.resin30.ApplyPatch C:\opt\resin30\lib
The following are additional steps to take when installing the Coherence*Web Session Management Module into a Oracle OC4J server:
jar -xvf webInstaller.jar web-install/coherence-web.jar
This will extract the coherence-web.jar file into a sub-directory named web-install. On Windows, use the following commands to move the coherence-web.jar file up one level into the library directory:
move web-install\coherence-web.jar . rmdir web-install
On Unix:
mv web-install/coherence-web.jar . rmdir web-install
java -cp tangosol.jar;coherence.jar;coherence-web.jar com.tangosol.coherence.servlet.oracle101.ApplyPatch
For example, on Windows:
java -cp tangosol.jar;coherence.jar;coherence-web.jar com.tangosol.coherence.servlet.oracle101.ApplyPatch C:\opt\oracle101\j2ee\home
During the inspect step, the Coherence*Web Installer performs the following tasks:
During the install step, the Coherence*Web Installer performs the following tasks:
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.
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.
java -jar coherence-loadbalancer.jar localhost:80 localhost:7001 localhost:7002
To run the load-balancer locally on a machine named server1 that load balances to port 7001 on server1, server2 and server3:
java -jar coherence-loadbalancer.jar server1:80 server1:7001 server2:7001 server3:7001
Assuming the above command line, an application that previously was accessed with the URL http://server1:7001/my.jsp would now be accessed with the URL http://server1:80/my.jsp or just http://server1/my.jsp.
The following command line options are supported:
-backlog | Sets the TCP/ IP accept backlog option to the specified value, for example: -backlog=64 |
-threads | Uses the specified number of request/ response thread pairs (so the total number of additional daemon threads will be two times the specified value), for example: -threads=64 |
-roundrobin | Specifies the use of a round-robin load-balancing algorithm |
-random | Specifies the use of a random load-balancing algorithm (default) |
Make sure that your application uses only relative re-directs or the address or the load-balancer.