Skip to content
Sample module for Infinispan
Latest commit 56cb8d8 Jan 11, 2012 @galderz galderz committed with maniksurtani ISPN-1608 Update sample module for Infinispan 5.1
This includes both using new mechanisms to declare custom commands,
updating code to use new configuration, and making the necessary
changes to the README file.
Failed to load latest commit information.

Sample Infinispan Module

The purpose of this sample module is to demonstrate the changes made to Infinispan in ISPN-256 to allow modules - such as query - to implement their own commands outside of the core module.


This sample is a fully working sample and the sample usage class in src/test/java can be examined and even run to demonstrate custom commands working. TRACE level logging is recommended to examine what goes on.


For this to work, you currently need Infinispan 5.1.0.CR2 or higher.

Instructions for module authors

Here's what you need to do:

  • Create a org.infinispan.commands.module.ModuleCommandExtensions file in META-INF/services folder (see sample).
  • Declare implementation name of ModuleCommandExtensions implementation you've created for your module. Remember that this indirectly requires you to implement both ExtendedModuleCommandFactory and ModuleCommandInitializer.
  • Actually implement them to be able to construct your new commands.
  • Implement your commands and the rest of your module.
  • Add <module.skipComponentMetaDataProcessing>false</module.skipComponentMetaDataProcessing> property to your maven build pom file.
  • Run mvn -Dmaven.test.skip.exec=true install so that metadata index file is generated.
  • Implement MetadataFileFinder and provide the metadata file name that has been generated.
  • Create a org.infinispan.factories.components.ModuleMetadataFileFinder file in META-INF/services folder which the name of the class that implements MetadataFileFinder.

Any feedback please direct it to the Infinispan forums.

Something went wrong with that request. Please try again.