• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Programmatic cache setting in Hibernate

 
Prabha Suresh
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can any one please tell me how to set second-level cache programmatically?
I know I can do
Configuration.setProperty("hibernate.cache.provider_class", "net.sf.hibernate.cache.EhCacheProvider" );

Where do I insert this code?
Is this code enough to set second-level caching??

Thank you.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic