[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Dummy question  XML
Forum Index -> Ehcache
Author Message
hb5fa

journeyman

Joined: 03/27/2009 13:33:53
Messages: 27
Offline

Hi all,

We have been using TC since 3.22 for Hashmaps, Queues, and variables for a long time. We are now investigating TC 3.5.1 + Hibernate + EHCache. So we wrote some simple POJOs to test them out. It has been a very interesting exercise and we have gained a little more insight on how they work together.

Unless our configuration is wrong, what we do not quite understand is that our current setup indicates that Hibernate+EHCache won't get shared among running instances. Also, Hibernate+EHCache goes away as the process dies; hence, new instance will not be benefited by previous runs.

We are actually expecting to see that Hibernate+EHCache to be persisted and shared in the cluster as long as the cluster exists although not necessary on disk. Is our expectation of how the clustered Hibernate+EHCache wrong? If we are correct in our finding, what is the role of Terracotta in this setup?

Please share your experience. Thanks in advance.
ericm

jedi

Joined: 01/27/2011 17:23:34
Messages: 117
Offline

Ehcache and Terracotta give you the ability to distribute your data among multiple application servers. You setup your caches in an ehcache.xml file and set the rules for how long the data will live in the cache (TTL or TTI). You must add the <terracotta /> tag to all caches you want to be distributed.

It sounds like you are having some setup issues. Please share your ehcache.xml file so we can better understand what is going on.

Also, are you using the Developer's Console? If so, when your application shuts down and it is the last JVM connected to the Terracotta Server, the Ehcache and Hibernate panels shut off. The data is still in the cache, just not visible through those panels until the next JVM connects.

I hope this helps.
Eric M

Eric Mizell (Terracotta Engineer)
genf20

neo

Joined: 07/17/2011 18:11:56
Messages: 1
Offline

Very helpful, thanks for the info. I had my share of setup issues as well..

Product review writer GenF20 Plus is my latest review
[WWW]
 
Forum Index -> Ehcache
Go to:   
Powered by JForum 2.1.7 © JForum Team