Joe Biron
Joe Biron

Reputation: 25

Terracotta With Hibernate and EHCache

Head swimming with the product name soup at http://www.terracotta.org. Need someone to help clarify what I need.

Background: app has some "legacy" persistence code that does not use Hibernate, but has a home-grown cache implementation. New entities are Hibernate enabled.

What I want: to use Terracotta for Hibernate 2nd level cache. I think I then want to slide out the home-grown cache impl and slide in ehcache (very similar semantically to home-grown version) - obviously I want Terracotta to back that EHCache as well.

Confused with: Will I be telling Hibernate that ehcache is it's cache provider, then configure ehcache to use terracotta?

So

(hibernate | legacy-persistence)-> ehcache -> terracotta

Am I on the right track? Forgive the newb question but the terracotta.org site really confuses me since so much of it it trying to sell me the commercial varieties.

Upvotes: 0

Views: 1954

Answers (2)

Derek Mahar
Derek Mahar

Reputation: 28386

These books, written by the founders and developers of Terracotta themselves, should answer your questions about using Terracotta with Ehcache and Hibernate:

Aside from the documentation available at the Terracotta website, these books seem to be the only Terracotta references available.

Upvotes: 1

Rich Lawrence
Rich Lawrence

Reputation: 1670

The short answer is Yes.

You should get your application working without Terracotta but with Hibernate first, then once your code works with Hibernate adding ehcache is fairly straight forward (and documented in the install guide here). Once that is done is just a case of adding your Terracotta jars, seting up the terrracotta config file and altering the ehcache config file to point to your terracotta instance.

The terracotta Hibernate express install guide lists the steps you need to take for using Hibernate with terracotta

Upvotes: 3

Related Questions