Re: Dynamic caches over JCache

2016-08-29 Thread vkulichenko
Josh,

You should use CacheManager.createCache to create it. As per spec, the
getCache() method returns 'the Cache or null if it does exist or can't be
pre-configured'. Unfortunately, CacheManager doesn't have anything like
getOrCreateCache.

-Val



--
View this message in context: 
http://apache-ignite-users.70518.x6.nabble.com/Dynamic-caches-over-JCache-tp7378p7384.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.


Dynamic caches over JCache

2016-08-29 Thread Josh Cummings
I am trying to do the following:

CacheManager cm = Caching.getCachingProvider().getCacheManager();
Cache cache = cm.getCache("my-cache");

At this point, cm points to an instance of
org.apache.ignite.cache.CacheManager and cache points to null.

I figured that Ignite would simply create the cache dynamically, but it
appears that CacheManager#getCache calls ignite.cache instead of
ignite.getOrCreateCache.

What is the correct way to use JCache and dynamically create a cache?

-- 

*JOSH CUMMINGS*

Principal Engineer

[image: Workfront] 

*O*  801.477.1234  |  *M*  8015562751

joshcummi...@workfront.com | www.workfront.com
Address   |  Twitter
  |  LinkedIn
  |  Facebook


[image: Workfront]