In your hibernate.cfg.xml or persistence.xml , add the following properties to enable the cache and specify the region factory: Hibernate EHCache - Hibernate Second Level Cache
You can find all versions on the Maven Repository for hibernate-ehcache . hibernate-ehcache jar download maven
Maven will automatically download the JAR and its transitive dependencies (like ehcache-core or ehcache ) into your local repository. 2. Choosing the Right Version In your hibernate
Version compatibility is critical when integrating caching providers. In your hibernate.cfg.xml or persistence.xml