JBoss Community

Re: Jboss 7.x - HA Web Sessions via Database Persistence with Oracle

created by Paul Ferraro in Datasource Configuration - View the full discussion

To enable session persistence to a database:

1. Configure your datasource.  See https://community.jboss.org/wiki/DataSourceConfigurationInAS7

2. Assuming you're using a non-HA profile (e.g. standalone.xml), add a "web" cache container to the infinispan subsystem.  The default cache of this cache container should be a local-cache configured with a jdbc cache store using the datasource defined in step 1.

e.g.

{code:xml}

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

  <local-cache name="local" batching="true">

    <key-based-jdbc-store datasource="java:jboss/datasources/LiferayPool_test" passivation="false" purge="false"/>

  </replicated-cache>

</cache-container>

{code}

3. Make sure your web application's web.xml declares itself as <distributable/>.

Reply to this message by going to Community

Start a new discussion in Datasource Configuration at Community