Require Java 11 for Hibernate ORM 6.0 #4286
Replies: 2 comments 5 replies
-
I agree with everything said here. I would quibble a bit about JDBC however. Sure this is a problem with the driver vendors, but it impacts us via our users. While we can certainly make arguments for everything else mentioned here, if users cannot use 6.0 with their database, that is a much harder sell. |
Beta Was this translation helpful? Give feedback.
4 replies
-
It's settled then, closing the topic. Thanks all! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Proposal for Hibernate ORM 6.0 to require Java 11 as minimal runtime JVM.
Let's try to enumerate our requirements, possible benefits and tradeoffs.
Who is Hibernate ORM 6 for?
Our requirements are essentially dictated by our users, and having many I have no doubt that dropping Java 8 compatibility will let down someone; but we need to also consider the benefits on the project, not least the opportunity costs of letting go older platforms for the benefit of freeing up our time on more valuable tasks.
I would also point out that surveying all our users will not provide us with useful data, as most of them are likely maintaining an existing system, and any mature system is likely to not upgrade to Hibernate ORM 6 yet - as this proposal has no impact on existing stable versions of Hibernate ORM 5, which will still aim to be compatible with Java 8 runtimes, and this proposal also has no impact on maintenance plans.
Users who do maintain projects actively and are following up on important updates such as Hibernate ORM 6 are likely to also have already upgraded JDK, as in most cases upgrading the runtime is a worthwhile task with an high benefit ratio and low risk.
The other aspect of our "requirements" is to satisfy the requirements of popular platforms integrating Hibernate:
Target platforms
It seems the most relevant platforms consuming Hibernate ORM are not planning to be compatible with Java 8.
Spring 6
As announced recently: Spring 6 is expected to require Java 17 . There is no expectation for older versions of Spring to support Hibernate ORM 6+, these will most likely keep using Hibernate ORM 5.x.
Quarkus
Quarkus is already requiring Java 11 today.
WildFly
WildFly is also planning to drop compability with Java 8 soon.
Other platforms
I'd say it is reasonable to consider all other platforms integrating Hibernate ORM to be in a similar position of all our individual users: if they are risk averse and still not upgrading from older JDKs, they are welcome to keep using Hibernate ORM v5 for longer.
Advantages
It would seem that the immediate advantages for us are not very compelling, still there are some good points to upgrade and I'd invite you to read the list not as individually persuasive points, but to consider that each area is otherwise a small pain point - and having many small pain points will be a problem in the long run. Especially worthwhile to consider the downsides for not upgrading are really low.
6.0
rather than regretting not having taken the opportunity when some of these reasons will resonate more: we should avoid changing required JDK in a minor.In particular while support of Java Modules is not currently on our roadmap, I expect it will be soon - it's quite complicated to do if we have to maintain Java 8 compatibility.
Drawbacks
As some mentioned, many JDBC driver vendors are still not implementing correctly the latest JDBC spec. Our requirement doesn't have impact on the bytecode of JDBC drivers though, so let's focus on how the JDBC API changes affect our own code and let's give an incentive to JDBC maintainers to catch up.
What this proposal is not
While it's tempting to discuss also if we should target an even more modern version, such as Java 17 which is also LTS and now available, I would suggest to focus on dropping compatiblity with Java 8 first.
Also I believe that dropping Java 11 compatibility is too aggressive at this point (and in conflict with the requirement to target Quarkus among compatible plaftorms), but we can certainly have a separate discussion about that.
Messaging & strategy
This is a bit more subtle, but it's also desireable to let users realize that Hibernate ORM 6 is a better fit for new(er) applications, as it's not meant as a drop-in replacement for applications running version 5.
Considering that we are a relatively small team, it is not in our interest to try having 100% of our active user base eligible to migrate to 6 as soon as it is released.
It is also reasonable to expect that while some minority of users will not be ble to upgrade to Java 11 yet, they will have to upgrade sometime in the near future (unless they are totally not maintaining their application, case in which they will not be upgrading Hibernate either).
Finally - the chicken and egg problem of our users still running on Java 8:
Some of our users have no direct control of which JDK they are running. But if we give them good reason - such as "this feature requires JDK 11 minimum" - then they will have a business justification to actually dedicate some time to address the JDK upgrade requirements.
Let's help people to make a case to upgrade.
Beta Was this translation helpful? Give feedback.
All reactions