-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Recipe to migrate the use of Ehcache 2.0 to 3.0 in Hibernate #2
Comments
This is for Hibernate 6.0, right? |
Yes, this is for the move to Hibernate 6.0. I believe this approach could be applied to versions of Hibernate 5.4 and higher. I honestly have not worked with Hibernate in a very long time, but I ran across this as part of the work in openrewrite/rewrite-migrate-java#157 (The |
@tkvangorder @knutwannheden @timtebeek In my view, Yes, hibernate-ehcache has been replaced with hibernate-jcache in Hibernate 6, this what have implemented in my recent project. <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jcache</artifactId>
<version>6.1.6.Final</version>
</dependency> Hence the above dependency can be added for while migrating to Hibernate 6 and we have add the following entry in application.properties file
So we can a recipe around it. Happy to work if the above solution is viable Thanks, |
Apologies for the late reply here; yes that seems like the correct step to take here, thanks! |
Hibernate has deprecated the use of the
ehcache
2.0 in favor of usingjcache
(with theehcache
3.0 as the underlying implementation)This recipe should:
hibernate-ehcache
dependency withhibernate-jcache
hibernate.cache.region.factory_class
property withjcache
And finally if the
ehcache.xml
file does not exist, it should create that file with a defaultCache entry:The text was updated successfully, but these errors were encountered: