infinispan

MySQL and Infinispan - JTA implementation

ぃ、小莉子 提交于 2019-12-24 15:33:00
问题 We have an web application under Tomcat, integrated with Hibernate 4X, Spring 4X and HibernateTransactionManager as our transaction manager (currently one MySQL resource). As part of our configuration distribution, we should integrate with Infinispan as our cache manager to store configuration with other format than in the MySQL . Meaning, not as Hibernate second level cache integration! I managed to integrate Infinispan with Spring but now I'm facing a big problem due to the fact the MySql

Infinispan File Cache Store

删除回忆录丶 提交于 2019-12-24 09:57:58
问题 I am trying to persist the entries in cache in a file using FileCacheStore but getting the following exception org.infinispan.commons.CacheException: Unable to invoke method public void org.infinispan.persistence.manager.PersistenceManagerImpl.start() on object of type PersistenceManagerImpl 回答1: You've initialized a cache with persistence. Make sure that you have read/write permissions to the cache file. This means that if your persistent cache files are initialized or located under /var

Infinispan Clustering applications on 2 servers

纵然是瞬间 提交于 2019-12-24 09:49:49
问题 I have a Scenario where i have 2 weblogic servers let say WL1 and WL2 in WL1 i have 2 applications deployed APP1 and APP2 in WL2 i have 2 applications deployed APP3 and APP4 I want to create a infinispan configuration where APP1 from WL1 forms a cluster with APP3 in WL2 and APP2 from WL1 forms a cluster with APP4 in WL2 So i tried using default UDP multicasting and looks like all 4 applications are forming a cluster, so i changed the multicast port to solve this issue but is this the only way

Infinispan replicated cache not replicating objects for read

ε祈祈猫儿з 提交于 2019-12-24 07:43:57
问题 We are trying to install a replicated cache across two infinispan nodes running on Wildfly 11 inside of Openshift. When we write an object on one node it doesn't show up on the other node for reading. At boot the nodes connect in the cluster and can see each other as can be seen in the logs: 22:59:52,513 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (thread-2) ISPN000094: Received new cluster view for channel mychannel: [port-12-z73rp|13] (2) [port-12-z73rp, port-12-q10wf]

Infinispan replicated cache not replicating objects for read

纵饮孤独 提交于 2019-12-24 07:43:27
问题 We are trying to install a replicated cache across two infinispan nodes running on Wildfly 11 inside of Openshift. When we write an object on one node it doesn't show up on the other node for reading. At boot the nodes connect in the cluster and can see each other as can be seen in the logs: 22:59:52,513 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (thread-2) ISPN000094: Received new cluster view for channel mychannel: [port-12-z73rp|13] (2) [port-12-z73rp, port-12-q10wf]

Infinispan size eviction + diskStore overflow

≡放荡痞女 提交于 2019-12-24 05:53:17
问题 I am trying to configure Infinispan to set a maximum entries in memory, and additional entries (if there are more then the memory size) should be persisted to local file store. Is it possible to set in infinispan (I am doing a programmatic configuration) ? It was doable in ehcache I remember, but cannot google any manual on infinispan... 回答1: The section describing the moving of entries from memory to the store when evicted is what is called as "passivation" in the Infinispan User guide here

Wrong working infinispan tree cache

青春壹個敷衍的年華 提交于 2019-12-24 04:12:58
问题 I use tree cache from infinispan 8.2.6.Final. And i have next service: public class TestService { public static final String FIRST_CACHE = "firstCache"; private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); @MCacheable(value = FIRST_CACHE, key = "/#{id}/first") public Object putInFirstCache(String id, String data) { log.info("putInFirstCache"); return data; } @MCacheable(value = FIRST_CACHE, key = "/#{id}/second") public Object putInSecondCache

How to get size of data in Infinispan cache, alternate for calculateInMemorySize of ehcache?

牧云@^-^@ 提交于 2019-12-23 14:56:07
问题 I am migrating from ehcache to infinispan. In ehcache we have net.sf.ehcache.Cache.calculateInMemorySize() to calculate in memory size. How to calculate in memory size in infinispan? 回答1: Tomas is right, there's no currently no way to calculate size of data in memory. We do however provide users with some guidelines on the memory overhead that Infinispan incurs, which helps users plan their memory requirements. Calculating the size of data in-memory is not trivial to achieve and requires a

Infinispan equivalent to ehcache's copyOnRead and copyOnWrite

谁说我不能喝 提交于 2019-12-23 12:16:01
问题 I am planning to implement a cache solution into an existing web app. Nothing complicated: basically a concurrent map that supports overflowing to disk and automatic eviction. Clustering the cache could be requirement in the future, but not now. I like ehcache's copyOnRead and copyOnWrite features, because it means that I don't have to manually clone things before modifying something I take out of the cache. Now I have started to look at Infinispan, but I have not found anything equivalent

Get the TTL at runtime with infinispan

空扰寡人 提交于 2019-12-23 09:25:43
问题 I am using the Infinispan cache. Is there any way to get the TTL (or lifepsan) of entries at runtime? I see the interface CacheEntry as a getLifespan() API but I don't see how to get a handle on CacheEntry interface, Thanks 回答1: To get the configuration of lifespan for entire cache, you can use: cache.getCacheConfiguration().expiration().lifespan(); and to obtain lifespan for specific entry, you can use: cache.getAdvancedCache().getCacheEntry("key").getLifespan(); Hope that helps! 回答2: Each