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
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.ModuleCommandExtensionsfile in META-INF/services folder (see sample).
- Declare implementation name of
ModuleCommandExtensionsimplementation you've created for your module. Remember that this indirectly requires you to implement both
- Actually implement them to be able to construct your new commands.
- Implement your commands and the rest of your module.
<module.skipComponentMetaDataProcessing>false</module.skipComponentMetaDataProcessing>property to your maven build pom file.
mvn -Dmaven.test.skip.exec=true installso that metadata index file is generated.
MetadataFileFinderand provide the metadata file name that has been generated.
- Create a
org.infinispan.factories.components.ModuleMetadataFileFinderfile in META-INF/services folder which the name of the class that implements
Any feedback please direct it to the Infinispan forums.