Spring Infinispan Integration on Wildfly
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/main updates Sep 17, 2016
README.md Update README.md Sep 19, 2016


Spring Infinispan Integration on Wildfly

This is a sample spring boot application that demonstrates Infinispan caching integration on Wildfly servers. It works for both local and distributed caching on both standalone and clustered Wildfly instances.

This application is tested on Wildfly 10.1.0.Final.

Running the application

The application war file can be built using maven.

    mvn clean install

The application also requires a custom cache container, below is how it can be created on Wildfly.

Standalone server mode

When running the server in a standalone mode add the following cache container config in standalone.xml file.

    <cache-container name="mycache" aliases="ha-partition" default-cache="default" module="org.wildfly.clustering.server">
        <local-cache name="default" />

Clustered server mode

For clustered mode, the server must be run with full-ha profile. And add the following cache container to standalone-full-ha.xml

    <cache-container name="mycache" aliases="ha-partition" default-cache="default" module="org.wildfly.clustering.server">
        <transport lock-timeout="60000"/>
        <replicated-cache name="default" mode="SYNC">
            <transaction mode="BATCH"/>


The application exposes the following rest endpoints to add, retrieve and remove cache entries

GET /rest/cache/{key}
PUT /rest/cache/{key}/{value}
DELETE /rest/cache/{key}


Visit the following blog post for more details

Spring and Infinispan Integration on Wildfly Cluster