Legacy Knowledge Base
Published Sep. 10, 2025

Setting Up Session Replication in Weblogic With Liferay Portal

Written By

Liferay Support

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

This article outlines how to set up session replication using Weblogic with Liferay Portal.

Resolution

  1. Open the Liferay Portal .war using an unzip editor.
  2. Navigate to the file: /WEB-INF/weblogic.xml
  3. Add this code in the section.
    <session-descriptor>
        <persistent-store-type>async-replicated-if-clustered</persistent-store-type>
    
  4. The weblogic.xml file should look something like this for Weblogic 10.3.6 and later:
    <xml version="1.0"?>
    
    <weblogic-web-app xmlns="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.2/weblogic-web-app.xsd">
    	<jsp-descriptor><keepgenerated>true</keepgenerated><page-check-seconds>60</page-check-seconds><precompile>true</precompile><precompile-continue>true</precompile-continue>
    	</jsp-descriptor>
    	<container-descriptor>
    		<prefer-application-packages>package-name>org.mozilla.*
    		</prefer-application-packages>
    		<optimistic-serialization>true</optimistic-serialization>
    		<show-archived-real-path-enabled>true</show-archived-real-path-enabled>
    	</container-descriptor>
    	<session-descriptor>
    		<persistent-store-type>async-replicated-if-clustered</persistent-store-type>
    	</session-descriptor>
    	<context-root>/</context-root>
    </weblogic-web-app>
    
  5. Save the file.
  6. Deploy the war to Weblogic Application Server.
  7. Repeat these steps for each node.

If using Weblogic 10.3.2 or older, Liferay Portal must use prefer-web-inf-classes instead of the prefer-application-packages.

Users must follow the additional steps below before deploying the portal .war to the application server:

  1. In the weblogic.xml file's section, replace the prefer-application-packages with the following:
    <prefer-web-inf-classes>true
  2. Delete the following jars in the WEB-INF/lib:
    • jaxrpc.jar
    • stax.jar
    • wstx.jar
    • xml-apis.jar
  3. Deploy the modified war to the application server.
  4. Repeat these steps for each node.

Load Balancing

Ideally, clusters are best optimized with a load balancer. However, setting a load balancer is beyond the purview of this article and Liferay Support. Users can find documentation on load balancers from the vendor of the web servers such as Apache.

 

 

Did this article resolve your issue ?

Legacy Knowledge Base