JBoss Community

How to do jboss caching

reply from Navin Surtani in JBoss Cache - View the full discussion

If you have configured Infinispan via xml already then you shouldn't need to do anything programatically. Just do something like: -

 

 

EmbeddedCacheManager cacheManager = new DefaultCacheManager(persistence.xml);
 
Cache cache = cacheManager.getCache();
 
 

 

And that should do it for you.

 

Well what you can do is get all the keys in the cache as a set - there's an API method on that. From there you can get hold of the values in the cache that you need. Simply put: - cache --> getKeys() --> {I can now get all the values that I'd require}.

Reply to this message by going to Community

Start a new discussion in JBoss Cache at Community