jQuery in Action, 3rd edition
The moose likes Object Relational Mapping and the fly likes Hibernate Second Level Cache Provider and Cache Monitor Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate Second Level Cache Provider and Cache Monitor" Watch "Hibernate Second Level Cache Provider and Cache Monitor" New topic

Hibernate Second Level Cache Provider and Cache Monitor

Ainar Martin

Joined: Mar 22, 2011
Posts: 11
I don't have much experience with Hibernate second level cache providers. I have achieved, following EHCache documentation, to configure in my hibernate.cfg.xml and ehcache.xml files the EHCache cache provider. I don't get any Hibernate errors, but I want to really see if the Cache works.

I have downloaded EHCache monitor (free development version) and have followed the documentation (set the probe in the application and run the script) but I always get in the monitor 0 probes registered and no cache statistics are displayed.

I have following cache parameters in my hibernate.cfg.xml:

my ehcache.xml file:

In my hibernate xml entity mapping file I have added:

I have searched for this problem in the web and in different forums, I have tried different configurations but I didn't have any results, I always get no probe registered. I am using Hibernate 4.

By the way, I would like to know if there is any other free Hibernate second cache level solution that has a good monitoring system. Which second level cache solution is easier to integrate?

I would also like to ask if there is any Hibernate-Memcached conector or plugin. I have found this conector:


but it is deprecated and doesn't support Hibernate 4.

Thank you for your help and advice.

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Hibernate Second Level Cache Provider and Cache Monitor
It's not a secret anymore!