jcache

How can I cluster application-scope state in wildfly?

无人久伴 提交于 2021-01-29 08:43:09
问题 I would like to cluster a map that is kept on application-level scope. A first thought was to use a @Singleton , @Clustered bean with a field holding my data. This does not seem to work and my guess is that it was never implemented This post proposes ways to implement clustered singletons but they seem complex. The only alternative that I see, apart from manually updating db table(s), is to use a replicated cache. My question is: Is it advised to declare and use an infinispan cache (like this

EE8 JCache annotation CacheResult doesn't work

一曲冷凌霜 提交于 2020-01-03 03:11:41
问题 I'm developing a WEB APP under JBoss EAP 7.2 (EE8) using EhCache as JCache implementation (JSR 107) I have this code: @Inject CacheManager cacheManager; @CacheResult(cacheName = "roles") public List<RoleDTO> get(@CacheKey String id) { return service.getRoles(id); } public List<RoleDTO> getRoles(final String userId) { final List<RoleDTO> output = get(userId); return output; } According to this article I read, I'd expect the second time I access the get(userId) method should use cache and

Exception while trying to make Hazelcast cluster work with JCache compliant client

岁酱吖の 提交于 2019-12-24 03:01:22
问题 I am trying to make a small Hazelcast cluster cooperate with simple JCache compliant client. Unfortunately, I get the exception: "java.lang.IllegalArgumentException: No service registered with name: hz:impl:cacheService". I would appreciate a clue how to fix that. I am using version 3.4 of Hazelcast (got the same behavior with 3.3 and 3.4-EA). Here is a snippet from hazelcast-client.xml: <group> <name>group1</name> </group> <network> <cluster-members> <address>192.168.56.10:5701</address>

Exception while trying to make Hazelcast cluster work with JCache compliant client

三世轮回 提交于 2019-12-24 03:01:20
问题 I am trying to make a small Hazelcast cluster cooperate with simple JCache compliant client. Unfortunately, I get the exception: "java.lang.IllegalArgumentException: No service registered with name: hz:impl:cacheService". I would appreciate a clue how to fix that. I am using version 3.4 of Hazelcast (got the same behavior with 3.3 and 3.4-EA). Here is a snippet from hazelcast-client.xml: <group> <name>group1</name> </group> <network> <cluster-members> <address>192.168.56.10:5701</address>

Spring Ehcache3 cause exception with with key-type and value-type

守給你的承諾、 提交于 2019-12-22 12:36:27
问题 I try to use ehcache3 on project with spring 4.3. I configured cache manager: <cache:annotation-driven /> <bean id="cacheManager" class="org.springframework.cache.jcache.JCacheCacheManager"> <property name="cacheManager"> <bean class="org.springframework.cache.jcache.JCacheManagerFactoryBean"> <property name="cacheManagerUri" value="classpath:ehcache.xml"/> </bean> </property> </bean> And ehcache.xml : <config xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns='http://www.ehcache.org

Mixing declarative and imperative JCache configurations

∥☆過路亽.° 提交于 2019-12-14 02:12:22
问题 I'm trying to setup (J)caches in a mix of declarative and imperative configuration, as the JCache standard doesn't provide a means to limit the max size a cache can occupy. I want to do it as much "provider independent" as possible, so I have the flexibility to change provider in the future. Currently I have the limitation of using Java 7, so Caffeine is discarded, I believe. I keep a list of the caches and the duration (TTL) for their entries in my application.yaml, which I get with a

Does Hazelcast honor a default cache configuration

时光怂恿深爱的人放手 提交于 2019-12-12 17:35:51
问题 In the hazelcast documentation there are a few brief references to a cache named "default" - for instance, here: http://docs.hazelcast.org/docs/3.6/manual/html-single/index.html#jcache-declarative-configuration Later, there is another mention of cache default configuration here: http://docs.hazelcast.org/docs/3.6/manual/html-single/index.html#icache-configuration What I would like is to be able to configure "default" settings that are inherited when caches are created. For instance, given the

JCache with Oracle Coherence

走远了吗. 提交于 2019-12-11 08:02:21
问题 Oracle Coherence states that it is "JCache-compliant". How can I take my code written against JSR-107, specifically the ehcache-jcache jar, and run it against Oracle Coherence? 回答1: Final JCache APIs are expected to be released in summer/fall 2013. Then you can expect to see those final APIs supported in Coherence. Update (14 February 2014) - As soon as we check off some legal check-boxes, the APIs & RI & TCK are all ready to be submitted for approval, and the next version of Coherence