My Quotes


When U were born , you cried and the world rejoiced
Live U'r life in such a way that when you go
THE WORLD SHOULD CRY






Wednesday, October 10, 2012

EhCache and Hibernate issue

Session factory issue in setting up hibernate distributed ehcache with terracotta.

If you want the cache (or the caches) to be available from different JVMs you will need Terracotta; ehCache alone cannot do that. 

EhCache is not a distributed solution. So you need to use it with Terracotta to obtain the result you want. 

You can use Hazelcast, but also Infinispan to obtain this result



a.      Add the following jar files
<dependency>
  <groupId>net.sf.ehcache</groupId>
  <artifactId>ehcache-core-ee</artifactId>
  <version>2.5.2</version>
  <scope>compile</scope>
</dependency>
<dependency>
  <groupId>net.sf.ehcache</groupId>
  <artifactId>ehcache-terracotta-ee</artifactId>
  <version>2.5.2</version>
  <scope>compile</scope>
</dependency>
<dependency>
  <groupId>org.terracotta</groupId>
  <artifactId>terracotta-toolkit-1.5-runtime-ee</artifactId>
  <version>4.2.0</version>
  <scope>compile</scope>
</dependency>

No comments :