Do you know of a Java EE compliant way to hold data (let's say a couple of key-value pairs) in a Java EE application without using a database? The solution should be usable in a cluster. I know about the concepts of data grids (e.g. Infinispan in JBoss), but i'd prefer a solution where the application does not depend on a specific application server (JCache would be great, for example, but as far i understood it, that is only usable as local cache with Infinispan, not as distributed cache).
So is it possible, for example, to save data somehow with CDI (maybe in context @ApplicationScoped)? If yes, could you describe, how?
EDIT: Thank you for all your answers. All of them right now recommend me to use certain frameworks. But isn't there a way just with the Java EE stack to do sth. like this?