Chapter 16. Data Grid Modules for Red Hat JBoss EAP


To use Data Grid inside applications deployed to Red Hat JBoss EAP, you should install Data Grid modules that:

  • Let you deploy applications without packaging Data Grid JAR files in your WAR or EAR file.
  • Allow you to use a Data Grid version that is independent to the one bundled with Red Hat JBoss EAP.
Important

Data Grid modules are deprecated and planned for removal. These modules provide a temporary solution until Red Hat JBoss EAP directly manages the infinispan subsystem.

16.1. Installing Data Grid Modules

Download and install Data Grid modules for Red Hat JBoss EAP.

Prerequisites

  1. JDK 8 or later.
  2. An existing Red Hat JBoss EAP installation.

Procedure

  1. Log in to the Red Hat customer portal.
  2. Download the ZIP archive for the modules from the Data Grid software downloads.
  3. Extract the ZIP archive and copy the contents of modules to the modules directory of your Red Hat JBoss EAP installation so that you get the resulting structure:

    $EAP_HOME/modules/system/add-ons/rhdg/org/infinispan/rhdg-8.1

16.2. Configuring Applications to Use Data Grid Modules

After you install Data Grid modules for Red Hat JBoss EAP, configure your application to use Data Grid functionality.

Procedure

  1. In your project pom.xml file, mark the required Data Grid dependencies as provided.
  2. Configure your artifact archiver to generate the appropriate MANIFEST.MF file.

pom.xml

<dependencies>
  <dependency>
    <groupId>org.infinispan</groupId>
    <artifactId>infinispan-core</artifactId>
    <scope>provided</scope>
  </dependency>
  <dependency>
    <groupId>org.infinispan</groupId>
    <artifactId>infinispan-cachestore-jdbc</artifactId>
    <scope>provided</scope>
  </dependency>
</dependencies>
<build>
  <plugins>
     <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-war-plugin</artifactId>
       <configuration>
         <archive>
           <manifestEntries>
             <Dependencies>org.infinispan:rhdg-8.1 services</Dependencies>
           </manifestEntries>
         </archive>
      </configuration>
    </plugin>
  </plugins>
</build>

Data Grid functionality is packaged as a single module, org.infinispan, that you can add as an entry to your application’s manifest as follows:

MANIFEST.MF

Manifest-Version: 1.0
Dependencies: org.infinispan:rhdg-8.1 services

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.