Platform Framework
R24 AMR | Min(s) read

Setting up JBoss Data Grid

You can setup JBoss Data Grid for Enterprise Application Platform (EAP) version 6 and above using the following procedure.

  1. Download jboss-datagrid-6.6.0-eap-modules-library.zip (or above) from Red Hat and unzip it on top of $JBOSS_HOME.
  2. Place the modules into a separate slot (i.e. jdg-6.6) and reference them by the TAFJ module definition file.
  3. After unzipping jboss-datagrid-6.6.0-eap-modules-library.zip to the $JBOSS_HOME/modules directory, add the following modules to $JBOSS_HOME/modules/com/Temenos/tafj/main/module.xml under the dependencies section.

    <dependencies>

    Etc.

    <module name="javax.cache.api" slot="jdg-6.6" services="export"/>

    <module name="org.infinispan" slot="jdg-6.6" services="export"/>

    <module name="org.infinispan.commons" slot="jdg-6.6" services="export"/>

    <module name="org.infinispan.lucene" slot="jdg-6.6" services="export"/>

    <module name="org.infinispan.client.hotrod" slot="jdg-6.6" services="export"/>

    <module name="org.jgroups" slot="jdg-6.6" services="export"/>

  4. Download jboss-datagrid-6.6.0-server.zip and unzip it in your desired folder.
    This is your Jboss Data Grid Server and then becomes $JDG_HOME. Make a backup of either of the files standalone.xml or clustered.xml in $JDG_HOME/standalone/configuration.
  5. Edit either standalone.xml or clustered.xml (If you want to use Memory Grid Lock Manager, then edit clustered.xml) and reference this file while starting Jboss Data Grid server.
    Edit either standalone.xml or clustered.xml with the caches added for Temenos Transact from the original configuration.

    <subsystem xmlns="urn:infinispan:server:core:6.4">

    <cache-container name="local" default-cache="default" statistics="true">

    <local-cache name="default" start="EAGER">

    <locking striping="false" acquire-timeout="30000" concurrency-level="1000"/>

    <transaction mode="NONE"/>

    </local-cache>

    <local-cache name="Tables" start="EAGER" batching="false">

    <locking striping="false" acquire-timeout="20000" concurrency-level="500"/>

    <transaction mode="NONE"/>

    </local-cache>

    </cache-container>

    In case of editing clustered.xml, see the below configuration.

    <replicated-cache name="Tables" mode="SYNC" remote-timeout="60000" start="EAGER">

    <locking isolation="REPEATABLE_READ" acquire-timeout="20000"

    concurrency-level="500" striping="false" />

    <transaction mode="NONE" />

    <expiration lifespan="3600000" max-idle="-1" interval="60000" />

    <eviction strategy="LRU" max-entries="50000" />

    </replicated-cache>

    <replicated-cache name="MemoryLockingCache" mode="SYNC"

    remote-timeout="60000" start="EAGER">

    <locking isolation="READ_COMMITTED" acquire-timeout="600000"

    concurrency-level="1000" striping="true" />

    <transaction mode="NON_XA" locking="PESSIMISTIC"/>

    <expiration lifespan="-1" max-idle="-1" interval="-1" />

    <eviction strategy="NONE" />

    </replicated-cache>

How the communication works between the EAP appserver and the JBoss Data Grid server?

The communication from the EAP appserver to the JBoss Data Grid server occurs through a HotRod client. Your JBoss Data Grid server configuration depends on the EAP configuration. For example, if you have a clustered EAP with two nodes and each node exists on a separate machine, you might want a clustered JBoss Data Grid server set up to match the EAP configuration and use replicated caches.

You must start your JBoss Data Grid on a port offset to avoid conflicts, i.e.

./standalone.bat -c clustered.xml -Djboss.socket.binding.port-offset=100

The port HodRod starts, as it must match the value in your caching.properties:

11:55:04,856 INFO [org.infinispan.server.endpoint] (MSC service thread 1-7) JDGS010000: HotRodServer starting

11:55:04,859 INFO [org.infinispan.server.endpoint] (MSC service thread 1-7) JDGS010001: HotRodServer listening on 127.0.0.1:11322

In caching.properties,

………………………………..

temn.cache.jboss.jdg.port = 11322

Using JBoss Data Grid with a Standalone Client

To use JBoss Data Grid with a Standalone Client,

  1. Download jboss-datagrid-6.6.0-remote-java-client.zip and install it in $TAFJ_HOME/ext. This is required for DBTools, if you are using Memory Grid Lock Manager for viewing and removing locks.
  2. Start your JBoss Data Grid server. Now running programs will cache data when you read it in standalone mode.

Copyright © 2020- Temenos Headquarters SA

Published on :
Monday, May 27, 2024 5:03:10 PM IST