Hi Got it working by providing a config file to the getCacheManager method as you suggested on SO. Thanks!
-- Henrik On Tue, Jan 26, 2016 at 11:27 PM, vkulichenko <[email protected] > wrote: > Hi Henrik, > > JCache allows to provide provider-specific configuration when creating a > cache. I.e., you can do this: > > // Get or create a cache manager. > CacheManager cacheMgr = Caching.getCachingProvider().getCacheManager(); > > // This is an Ignite configuration object > (org.apache.ignite.configuration.CacheConfiguration). > CacheConfiguration<Integer, String> cfg = new CacheConfiguration<>(); > > // Specify cache mode and/or any other Ignite-specific configuration > properties. > cfg.setCacheMode(CacheMode.PARTITIONED); > > // Create a cache based on configuration create above. > Cache<Integer, String> cache = cacheMgr.createCache("a", cfg); > > Also note that partitioned mode is actually the default one in Ignite, so > you are not required to specify it explicitly. > > -Val > > > > -- > View this message in context: > http://apache-ignite-users.70518.x6.nabble.com/Can-I-use-the-JCache-API-for-distributed-caches-in-Apache-Ignite-tp2726p2731.html > Sent from the Apache Ignite Users mailing list archive at Nabble.com. >
