This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes How to check  Secondary Cache? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "How to check  Secondary Cache?" Watch "How to check  Secondary Cache?" New topic
Author

How to check Secondary Cache?

Ramana Kamal
Greenhorn

Joined: Dec 29, 2006
Posts: 1
Hi all,
I have configured Hibernate secondary level cache using EhCache.I have Ehcache.xml in classpath and i updated cache provider class in My hibernate configuration file.Now my doubt is is there any way we can test wheather caching is working or not?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60804
    
  65

"Ramana KK",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

You can always enable Hiberate statistics and see hit miss ratio, this will tell you if it is getting things from the second level cache.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Lakshmi Dasari
Ranch Hand

Joined: Mar 03, 2003
Posts: 35
You need to enable statistics inorder to see the hit / miss ratio. Make sure you have the property

enabled in your hibernate configuration file.

[ January 01, 2007: Message edited by: Lakshmi Dasari ]
[ January 01, 2007: Message edited by: Lakshmi Dasari ]

Lakshmi
 
 
subject: How to check Secondary Cache?
 
Similar Threads
EJB3 and Hibernate Second Level Cache Invalidation
Question on JPA
Can I use Hibernate in my RFID based attendance tracking application?
Synchronizing two hibernate sessions
Handling in memory objects with autogenrated key