Session replication in Weblogic Cluster
  • Share this blog:

Replicating session in JBoss 

In this tutorial, we will see how to do Session replication in Weblogic Cluster You now need to use the node1 and node2 created before In session-test.war/WEB-INF/web.xml, add:


  <display-name>Session Test</display-name>


  <distributable/> <!--  -->



Your application’s HTTP sessions now use the distributed cache.


  • Disable sticky sessions (optional)
  • Redeploy session-test.war to node1/deploy and node2/deploy directories
  • Restart and retest You can now see that your application is fault-tolerant, it supports failover AND state replication Problems with sticky sessions?
  • Uneven distribution of load
  • If one instance goes down, all of its sessions go with it

You can configure session replication here:

  • Sessions are replicated by all/deploy/cluster/jboss-cache-manager.sar:
  • Caching Configuration: replication queue
  • Cluster Name and Configuration: communication

Inclined to build a profession as JBoss Developer? Then here is the blog post on, explore JBoss Training

  • Configure session replication per app in WEB-INF/jboss-web.xml


Replication granularity: SESSION, ATTRIBUTE, FIELD


<deployment ...>


 <bean name="CacheConfigurationRegistry" ...>


 <property name="newConfigurations">

  <map keyClass="java.lang.String" valueClass="org.jboss.cache.config.Configuration">



   <bean name="StandardSessionCacheConfig" class="org.jboss.cache.config.Configuration">


   <property name="clusterName">${}-SessionCache</property>

    <property name="multiplexerStack">${jboss.default.jgroups.stack:udp}</property>

    <property name="fetchInMemoryState">true</property>

    <property name="nodeLockingScheme">PESSIMISTIC</property>

    <property name="isolationLevel">REPEATABLE_READ</property>

     <property name="useLockStriping">false</property>

     <property name="cacheMode">REPL_ASYNC</property>

     <property name="syncReplTimeout">17500</property>

     <property name="lockAcquisitionTimeout">15000</property>












You can also specify for each application some parameters: WEB-INF/jboss-web.xml:







About Author
Author Bio

TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.