How to configure second level cache in Hibernate ?

1. Configure Provider class in Hibernate configuration file.

2. Add Cache usage tag ( read-only or read-write ) in mapping files ( hbm ).

3. Create an XML file called ehcache.xml and place in classpath which contains time settings and update settings, behavior of cache , lifetime and idletime of Pojos, how many objects are allowed.



Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner
comments powered by Disqus