Hello guys,
I'm trying to implement Oracle Cohere into a pre-defined application, this application uses Spring Cache ( Jcache ) with HazelCast.
Following the simple tutorial on Coherence documentation I could create a local cache and put some objects without problems, using the above code:
// get cache manager
CachingProvider cachingProvider = Caching.getCachingProvider();
CacheManager cacheManager = cachingProvider.getCacheManager();
//create and use the cache
cacheManager.createCache("myCache", config);
Cache<String, String> cache = cacheManager.getCache("myCache",
String.class, String.class);
However, this code always create a cache ( cacheManager.createCache("myCache", config); ) I was wondering how to configure a client app that connect to a existent cache using Jcache API.
Following you can find my coherence-jcache-cache-config.xml
<caching-scheme-mapping>
<cache-mapping>
<cache-name>myCache</cache-name>
<scheme-name>distributed</scheme-name>
</cache-mapping>
</caching-scheme-mapping>
<caching-schemes>
<distributed-scheme>
<scheme-name>distributed</scheme-name>
<service-name>DistributedCache</service-name>
<backing-map-scheme>
<local-scheme/>
</backing-map-scheme>
<autostart>true</autostart>
</distributed-scheme>
</caching-schemes>
</cache-config>
Is there any complete example using Jcache Coherence with external cluster ? or using Jcache with Spring and @CacheResult (javax.cache: The new Java Caching Standard | Greg Luck's Blog) ?