1] Create a package com.sapient.hibernate.cache and copy the 2 .java files in that package.
2] Copy the jar file in lib and add to build path
Add the following to cfg file :-
<property name="hibernate.cache.provider_class">
net.sf.ehcache.hibernate.EhCacheProvider</property>
Add the following to book.hbm.xml directly under class tag
<cache usage="read-only"/>
Thanks and Regards,
Vivek Mehta
No comments:
Post a Comment