Coherence*Web can be used in a WebLogic Portal environment to provide session state management based on Coherence. Coherence*Web allows for more advanced deployment models, session models, and locking modes in a clustered environment. For more information on these features, see Chapter 4, "Coherence*Web Session Management Features."
Follow these steps to use Coherence*Web with WebLogic Portal.
Note:
WebLogic Server versions 10.3.1 or later do not require a patch. If you are using version 10.3.1 or later, you can skip this step.If you are using WebLogic Server 10.3 or earlier, apply the WebLogic Server publicly available patch to all WebLogic Server instances that are hosting the Web applications that will use Coherence*Web. Table 5-1 lists the appropriate patches for your version of WebLogic Server and Coherence release level.
Table 5-1 Required WebLogic Server and Coherence Patch Release Levels
| WebLogic Server 9.2 MP1 | WebLogic Server 10.3 | WebLogic Server 10.3.1 and later | |
|---|---|---|---|
|
WebLogic Smart Update |
Patch ID: AJQB |
No patch required. |
The patches can be downloaded by using either the MetaLink Web site or the WebLogic Server's Smart Update utility.
To Download from MetaLink:
Go to the Metalink Web site to manually locate the patch.
Select the Patches tab and click the Simple Search link. On the subsequent screen, submit a search for a Patch Number/Name with the appropriate value (for example, 11399293).
Download the patch zip file from the displayed results.
See the README.txt included in the patch zip file for instructions for applying the Coherence patch.
To Download with Smart Update:
Review the instructions in the Smart Update Guide for using Smart Update to install WebLogic Server patches.
For production environments, Oracle recommended that you review the Smart Update production installation.
You can find the Smart Update Guide at this URL.
https://download.oracle.com/docs/cd/E14759_01/doc.32/e14143/toc.htm
Select Start then All Programs then Oracle WebLogic then Smart Update to open the log-in dialog box. Use your Support ID and Password to log in.
Figure 5-1 Oracle Smart Update Login Dialog Box

Download and apply the appropriate patch for your version of the WebLogic Server. Figure 5-2 illustrates the Oracle Smart Update browser.
Modify the session-cache-config.xml file (if necessary) to customize the Cache topology for Coherence*Web.
This configuration file is located in the /WEB-INF/classes directory within the coherence-web-spi.war file. If you modify session-cache-config.xml, then it should be updated in the WAR file.
See Appendix C, "Session Cache Configuration File" for a description of the default configuration of the session-cache-config.xml file.
A Cache Server JVM is a dedicated Coherence JVM that is responsible for storing and managing all cached data (in this case, HttpSession state). One or more Cache Server JVMs must be started before the WebLogic Server or WebLogic Portal JVMs can be started.
Create a script for starting a Cache Server JVM. The following is a very simple example of a script that starts a storage-enabled Cache Server for use with Coherence*Web. This example assumes that you are using a Sun JVM. See "JVM Tuning" in the Developer's Guide for Oracle Coherence for more information on tuning your particular JVM.
java -server -Xms512m -Xmx512m -cp <Coherence installation dir>/lib/coherence.jar:<Coherence installation dir>/lib/coherence-web-spi.war -Dtangosol.coherence.management.remote=true -Dtangosol.coherence.cacheconfig=WEB-INF/classes/session-cache-config.xml -Dtangosol.coherence.session.localstorage=true com.tangosol.net.DefaultCacheServer
Start one or more Cache Server JVMs using the script described above.
Copy the coherence.jar into the APP-INF\lib directory of the portal enterprise application.
If you want to use the Coherence P13N (Personalization) CacheProvider, then copy the coherence-wlp.jar into the APP-INF\lib of the portal enterprise application.
See the Integration Guide for Oracle Coherence for more information on the P13N CacheProvider SPI implementation and WSRP-federated portals.
If you want to use the Coherence P13N Cache as the default cache provider, add the following line before the first <cache> element to the META-INF\p13n-cache-config.xml file in the portal enterprise application:
<default-provider-id>com.tangosol.coherence.weblogic</default-provider-id>
Reference coherence-web-spi.war by using a library-reference in the WEB-INF\weblogic.xml file in the portal Web application:
<wls:library-ref>
<wls:library-name>coherence-web-spi</wls:library-name>
</wls:library-ref>
To enable Coherence*Web sessions, set the application parameter coherence-web-sessions-enabled to true in the WEB-INF\web.xml file in the portal Web application:
<context-param>
<param-name>coherence-web-sessions-enabled</param-name>
<param-value>true</param-value>
</context-param>