Skip to main content

JCACHE (JSR 107) support in Glassfish

Please note these forums are being decommissioned and use the new and improved forums at
2 replies [Last post]
Joined: 2013-01-18

I was wondering if anyone has and idea what the plan is for JCACHE (JSR-107, JSR-347) support in Glassfish?

It's well documented that JCACHE missed JEE7, but the consensus seems to be that the project will be completed well before JEE8. Some distribution providers (such as Inifinispan) are already claiming support.

I can't seem to find any information on the subject of Glassfish's roadmap, however.

Firstly, where would the support come from? Would a Glassfish sub-project (e.g. Shoal) implement the API, or would it be a case of dropping in the reference implementation jars?

Secondly, has anyone tried it yet? If so, how was it configured?

Any information would be greatly appreciated.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2013-08-07

Hi Andrew,

I can't speak for the GlassFish developers but I'll have a go with an opinion ;-)

As a member of the expert group, JSR107 is currently in public draft review so it's not out yet but it is close.

IMHO I'm not sure Shoal would be the right place to put JSR107 as it is the cluster implementation and JSR107 is a caching api. Clustered caches could use Shoal as part of their implementation but JSR107 doesn't mandate a clustered cache.

Dropping in the reference implementation would give you access to the JSR107 api. However the reference implementation is not clustered so is just a local cache. I haven't tried it so I don't know if it integrates with CDI etc. Assuming it works though swapping JSR107 providers would be pretty simple if you need more than the RI local cache.

If you need a clustered data grid accessible from GlassFish then the Oracle solution is Coherence or as you say you could go with an open source alternative like Infinispan. Both are getting or already have first cut JSR107 implementations.

If you need any help or assistance with options give me a shout.

Steve Millidge

Joined: 2013-01-18

Hi Steve,

Thanks for the reply, it's exactly what I was looking for!

I will absolutely give Coherence a go, it sounds exactly what we're looking for.

We use Infinispan currently (though not via the JCache API), but I am working on a project to "vendor-neutralise" our approach to various things, such as distributed caching, the goal being the avoidance of long-term tie-in.

It's all very well saying you are vendor-neutral, but I find that this is invariably not the case until you actually support more than one vendor!

As such, I will most likely be be changing our Infinispan usage to correspond to the JSR (for use in JBOSS) and implementing a Coherence version (for use in Glassfish).

Thanks again,

Andrew Scully.