I've been using Singleton-EJBs in this fashion (as shown by Adam Bien in his blog):
@Singleton
public class MyCache {
ConcurrentHashMap<String, Object> myMap= new ConcurrentHashMap<String, Object<>();
//...Crud methods to the map
}
Now with JCache being a candidate for java-ee-8 i read the following in the JCache spec:
A Cache is a Map-like data-structure that permits the temporary storage of Key-based Values. A Cache is owned by a single CacheManager.
Assuming JCache makes it into the next java-ee spec, should something else be prefered over above?
What additional features will JCache API enable?