2 Replies Latest reply on Dec 23, 2018 2:05 PM by Nagendra Vummadi

    Session replication using Database persistence in Jboss 7.0.7

    Nagendra Vummadi Newbie

      We have a HA cluster configured using Apache as Webserver and Jboss EAP 7.0.7 as the Application server. cluster has 2 nodes. Database is Oracle 12c

      We configured Data source and WEB cache-container in standalone-full-ha.xml as below.


      1.                <datasource jndi-name="java:/jbsessionds" pool-name="jbsessionds" enabled="true">













                          <driver name="oracle" module="DBDRIVER">




      2. User jbsession created in Database as below:

      CREATE USER jbsession IDENTIFIED BY jbsession;

      GRANT CONNECT TO jbsession;


      GRANT CREATE SESSION TO jbsession with admin OPTION;


      3.            <cache-container name="web" default-cache="database" module="org.jboss.as.clustering.web.infinispan">

                      <transport lock-timeout="60000"/>

                      <local-cache name="database">

                          <binary-keyed-jdbc-store data-source="jbsessionds" dialect="ORACLE" purge="false" shared="true" singleton="false">

                              <binary-keyed-table prefix="JBSESSION">

                                  <id-column name="id" type="VARCHAR2(500)"/>

                                  <data-column name="datum" type="BLOB"/>

                                  <timestamp-column name="version" type="NUMBER"/>






      After restarting the Jboss server, there were no errors observed in the server.log related to the above changes. Tables were created in Database for the applications installed in our Application server as follows:




      and so on..


      and could see some sessions for user JBSESSION in GV$sessions table.


      But when i login to my application and create sessions, i do not see any entries in any of the tables mentioned above and when i try to validate the session replication scenario, by stopping the Jboss node in which the session is created, fail over is not happening. (since session data is not getting persisted)


      I believe i'm missing some thing in terms of Data source or the cache-container configuration or both. With distributed mode we are able to achieve session replication, so i doubt there is anything missing from application perspective.


      Appreciate any inputs in this regard.