5 Installing Coherence*Web on WebLogic Portal 10.3

Coherence*Web can be installed 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."

5.1 Installing Coherence*Web with WebLogic Portal


As with other WebLogic Server applications, all of the information and instructions in Chapter 2, "Installing Coherence*Web on the WebLogic Server 10.3" apply to deploying Coherence*Web with WebLogic Portal. Please read Chapter 2 before proceeding. It provides much needed context for the following information.

However, note that you do not have to install Coherence*Web on WebLogic Server to install it on WebLogic Portal.

Complete these steps to install Coherence*Web with WebLogic Portal applications:

  1. Install WebLogic Patch ID N41D according to the instructions described in "Overview Of Configuration and Deployment".

  2. Copy the coherence.jar (included in Coherence 3.4.2) into the APP-INF\lib directory of the portal enterprise application.

  3. (Optional) If you want to use the Coherence P13N CacheProvider, then copy the coherence-wlp.jar into the APP-INF\lib of the portal enterprise application.

    See "Using Coherence*Web and WebLogic Portal" for more information on the P13N CacheProvider SPI implementation and WSRP-federated portals.

  4. (Optional) If you want to use the Coherence P13N Cache as the default cache provider, add the following element before the first <cache> element to the META-INF\p13n-cache-config.xml file in the portal enterprise application:

  5. Reference coherence-web-spi.war by using a library-reference in the WEB-INF\weblogic.xml file in the portal Web application:

  6. 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:

  7. Create a .EAR of the test application using workshop's EAR deployment. This EAR will be deployed to the cluster for testing.

  8. In the portal domain, first deploy coherence-web-spi.war as a library to the cluster.

  9. In the portal domain, deploy the application EAR to the cluster.

5.2 Using Coherence*Web and WebLogic Portal

Coherence integrates closely with Oracle WebLogic Portal. Specifically, Coherence includes the following integration points:

  • Coherence*Web for HTTP session state management

  • P13N CacheProvider SPI implementation

  • A blueprint for efficiently sharing data between WSRP-federated portals that uses Coherence and the WebLogic Portal Custom Data Transfer mechanism

5.2.1 P13N CacheProvider SPI Implementation

Internally, WebLogic Portal uses its own caching service to cache portal, personalization, and commerce data as described here:


WebLogic Portal 8.1.6 and later includes an SPI for the P13N caching service that can be implemented by third party cache vendors. Coherence includes a P13N CacheProvider SPI implementation that, when installed into a WebLogic Portal application, will transparently manage cached P13N data without requiring code changes. Additionally, combining Coherence and WebLogic Portal gives you extreme flexibility in your choice of cache topologies.

For example, if you find that your Portal servers are bumping into the 4GB heap limit (on 32-bit JVMs) or are experiencing slow GC times, you can leverage a cache client/server topology to move serializable P13N state out of your Portal JVMs and into one or more dedicated Coherence cache servers,. This reduces your Portal JVM heap size and GC times. Also, you can use the Coherence Management Framework to closely monitor statistics to better tune your P13N cache settings. Finally, the Coherence CacheProvider also allows your portlets to use Coherence caching service by using the standard P13N Cache API.

To install the Coherence P13N CacheProvider:

  1. Copy the coherence-wlp.jar and coherence.jar libraries included from the lib directory of the Coherence installation to the APP-INF/lib directory of your WebLogic Portal application.

  2. Configure the Coherence P13N CacheProvider as the default provider in the p13n-cache-config.xml file found in each of your WLP application's META-INF directory. Specifically, add the following line immediately before the first <cache> element.:


See the Javadoc for the PortalCacheProvider class for details on configuring the Coherence CacheProvider and Coherence caches used by the provider.

See also the following document for a list of some of the caches used by WebLogic Portal:


5.2.2 Sharing Data Between WSRP-Federated Portals Using Coherence

The Web Services for Remote Portlets (WSRP) protocol was designed to support the federation of portals hosted by arbitrary portal servers and server clusters. Developers use WSRP to aggregate content and the user interface (UI) from various portlets hosted by other remote portals. By itself, though, WSRP does not address the challenge of implementing scalable, reliable, and high-performance federated portals that create, access, and manage the lifecycle of data shared by distributed portlets. Fortunately, WebLogic Portal provides an extension to the WSRP specification that, when coupled with Oracle Coherence, allows WSRP Consumers and Producers to create, view, modify, and control concurrent access to shared, scoped data in a scalable, reliable, and highly performant manner.

See the following document for complete details: