Implementing Ehcache on distributed environment
We have a clustered environment with 4 clusters(Different machines) each having 4 different nodes. I have implemented ehCache on a single instance of server and it works fine however in a clustered environment it doest work properly.
Since the implementation is to store the cache objects on Heap. There are 4 different caches available at a particluar time. I want to rectify this problem.
Can you please suggest is there anything which can be done in just standalone.xml to configure the ehcache on clsutered environment?
Responses
Hello Abhishek,
JBoss EAP 6 is distributed with Infinispan as an internal caching solution, so there wouldn't be any ehCache related configuration within the standalone/domain configuration. Note that the supported caching solutions by Red Hat are Infinispan (used by JBoss for internal caching only) and JBoss Data Grid for custom application caching. If you are using ehCache, you are more than likely going to have to package all the necessary libraries and configurations within an isolated application and deploy it to the JBoss instances.
Another thing to note: assuming your configuration is correct, since ehcache seems to depend on an underlying JGroups cluster for replication across nodes, make sure your nodes are "finding" each other. Make sure your network can effectively pass UDP traffic (if using the default multicast for cluster communication). The JGroups library come with a multicast test if needed.
-Jonathan
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
