Integration for JSR107/Redisson/CDI/Bluemix
Clone or download
Pull request Compare This branch is 36 commits ahead, 16 commits behind jsr107:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Configurable JCache Annotations

This is a simple fork of the RI annations layer to allow JSR107 Annotations to be used with CDI Containers, with the additional capability that the default CacheManager can be supplied via a java service approach, rather than coming from the usual


This allows for the CacheManager to be instantiated using config gathered programatically, and allows the application to pick & instantiate the backing JSR107 CacheManager implementation that should be used by the annotations.

The code is pretty much entirely the same as the Annotations & CDI layer from the JCache RI, at With a minor change to how the default CacheManager is configured, to allow the default CacheManager to come from a java service implementation, and a slight change to the CDI interceptor definitions to allow applications to depend on this repo as a jitpack library, with only an empty beans.xml.


To use this project.. add it as a dependency to your application..


And add an empty beans.xml to your WEB-INF folder.

To customise the CacheManager used by annotations, simply add a java services file with the name;


And include in that file, the name of the implementation class for the DefaultCacheManagerProvider you wish the annotations code to use.

org.jsr107.ri.annotations.DefaultCacheResolverFactory.DefaultCacheManagerProvider is a simple interface with a single method;

  public interface DefaultCacheManagerProvider {
    public CacheManager getDefaultCacheManager();

You could choose to say, parse VCAP_SERVICES within a cloud environment, and then instantiate an appropriately configured Redisson instance of JCacheManager, like this