Dropping support for Java 8 in Hibernate ORM (Search) v6 ?
by Sanne Grinovero
Hi all,
[meta: I had this email as a draft on hold since a year; very glad to
finally be able to send it.]
We're usually quite conservative in dropping support for older JDKs
within the Hibernate team, but there's an increasing maintenance (and
development) cost when keeping older JDK compatibility for too long.
In particular, Java 8 compatibility was so far still a requirement for
various strategic integrations; first, we had runtimes targeting
GraalVM still needing it, but they support Java 11 now as well; after
that, Azure Functions were also still requiring Java 8, but this
limitation was resolved now.
We're aware that Java 8 is still widely used; still I think we need to
look forward - for various reasons, including maintenance burden, and
to deliver a better experience on the later versions of the JDK. Also,
looking at the existing usage statistics implies a fallacy: that's
current production usage, while the code we normally work is
(typically) not going to see production usage for quite some time.
While we'll want to keep Java 8 compatibility for existing
[maintained] releases, there is no compelling reason anymore to keep
doing this for the upcoming major releases.
So I'd propose we require Java 11 the minimum compatible runtime for
ORM v6 onward, and I'd suggest we do the same with all our actively
developed projects.
Initially, I don't really expect this to significantly increase the
efforts from our already packed roadmaps: in the first stage this
proposal is literally only about making minimal changes to our build
scripts to change the compatibility versions, and for CI to stop
testing the JDK/branches combinations which are no longer supported.
In a second step, as convenient, we'll be able to:
- do some code cleanup / refactorings to benefit from the minor API
improvements of the JDK
- some APIs had more substantial improvements, such as java.sql now
features native support for multi-tenancy, literals and identifiers
enquoting [among others] .. might be interesting.
- finally benefit from Jigsaw?
Any thoughts?
Thanks,
Sanne
4 years, 3 months
Re: [hibernate-dev] JDK 15 is now in Rampdown Phase Two
by Rory O'Donnell
Thanks for the update Yoann !
Rgds,Rory
On 17/07/2020 14:00, Yoann Rodiere wrote:
> Hi Rory,
>
> I confirm that Hibernate ORM and Hibernate Search run fine on
> JDK15-ea+32 [1][2].
>
> I can't say for JDK16, since Gradle is giving me trouble and I haven't
> been able to run tests on JDK16 yet.
>
> [1] https://ci.hibernate.org/job/hibernate-orm-personal-yoann-jdk15/4/
> [2]
> https://ci.hibernate.org/blue/organizations/jenkins/hibernate-search/deta...
>
> Regards,
>
> Yoann Rodière
>
> Sr. Software Engineer, Middleware Engineering, Hibernate team
>
> Red Hat <https://www.redhat.com>
>
> <https://www.redhat.com>
>
>
>
> On Fri, 17 Jul 2020 at 10:49, Rory O'Donnell <rory.odonnell(a)oracle.com
> <mailto:rory.odonnell@oracle.com>> wrote:
>
> Hi Sanne, **
>
> *Per the JDK 15 schedule, we are in Rampdown Phase Two* *[1]*
>
> Per the JDK Release Process [2] we now turn our focus to *P1 and P2
> bugs*, which can be fixed with approval [3].
> Late enhancements are still possible, with approval [4], but the
> bar is
> now extraordinarily high.
>
> **Please advise if you have any open high priority issues.* *
>
> * Schedule for JDK 15
> o 2*020/07/16 Rampdown Phase Two*
> o 2020/08/06 Initial Release Candidate
> o 2020/08/20 Final Release Candidate
> o 2020/09/15 General Availability
>
> * Features included in JDK 15:
> o JEP 339: Edwards-Curve Digital Signature Algorithm (EdDSA)
> <http://openjdk.java.net/jeps/339>
> o JEP 360: Sealed Classes (Preview)
> <http://openjdk.java.net/jeps/360>
> o JEP 371: Hidden Classes <http://openjdk.java.net/jeps/371>
> o JEP 372: Remove the Nashorn JavaScript Engine
> <http://openjdk.java.net/jeps/372>
> o JEP 373: Reimplement the Legacy DatagramSocket API
> <https://openjdk.java.net/jeps/373>
> o JEP 374: Disable and Deprecate Biased Locking
> <http://openjdk.java.net/jeps/374>
> o JEP 375: Pattern Matching for instanceof (Second Preview)
> <https://openjdk.java.net/jeps/375>
> o JEP 377: ZGC: A Scalable Low-Latency Garbage Collector
> <http://openjdk.java.net/jeps/377>
> o JEP 378: Text Blocks <http://openjdk.java.net/jeps/378>
> o JEP 379: Shenandoah: A Low-Pause-Time Garbage Collector
> <https://openjdk.java.net/jeps/379>
> o JEP 381: Remove the Solaris and SPARC Ports
> <https://openjdk.java.net/jeps/381>
> o JEP 383: Foreign-Memory Access API (Second Incubator)
> <https://openjdk.java.net/jeps/383>
> o JEP 384: Records (Second Preview)
> <https://openjdk.java.net/jeps/384>
> o JEP 385: Deprecate RMI Activation for Removal
> <https://openjdk.java.net/jeps/385>
>
> *JDK 15 **Early Access build 32 **is available**at : -
> jdk.java.net/15/* <http://jdk.java.net/15/*>
>
> These early-access, open-source builds are provided under the GNU
> General Public License, version 2, with the Classpath Exception.
>
> * Release notes
> o http://jdk.java.net/15/release-notes
> * Recent fixes that might be of interest
> o
>
> Build 32
>
> + 8231800: Better listing of arrays
> + 8234836: Improve serialization handling
> o Build 31
> + JDK-8248505: Unexpected NoSuchAlgorithmException when
> using
> secure random impl from BCFIPS provider
> o Build 29
> + JDK-8233014: Enable ShowCodeDetailsInExceptionMessages by
> default
>
> *JDK 16 Early Access build 6 ****is available**at : -
> jdk.java.net/16/* <http://jdk.java.net/16/*>
>
> These early-access, open-source builds are provided under the GNU
> General Public License, version 2, with the Classpath Exception.
>
> * JEP Candidate
> o JEP 388: Windows/AArch64 Port
> <https://openjdk.java.net/jeps/388>
> * JEPs proposed to target
> o JEP 347: Enable C++14 Language Features
> <https://openjdk.java.net/jeps/347>
> * JEPs targeted to JDK 16, so far:
> o JEP 369: Migrate to GitHub <https://openjdk.java.net/jeps/369>
> o JEP 357: Migrate from Mercurial to Git
> <https://openjdk.java.net/jeps/357>
>
> **
>
> * Recent fixes that might be of interest
> o
>
> Build 32
>
> + 8231800: Better listing of arrays
> + 8234836: Improve serialization handling
> o Build 5
> + JDK-8218021: Have jarsigner preserve posix permission
> attributes
> + JDK-8245302: Upgrade LogRecord to support long thread ids
> and remove its usage of ThreadLocal
> + JDK-8248505: Unexpected NoSuchAlgorithmException when
> using
> secure random impl from BCFIPS provider
>
> *Cryptoroadmap updated *
>
> * https://www.java.com/en/jre-jdk-cryptoroadmap.html
>
> *The "Best of the JDK" feature face-off tournament: Result!*_*
> *_
>
> * *JDK Mission Control *is the winner based on the Twitter poll
> <https://twitter.com/java/status/1281595323685703683?s=20>.
>
> *The Quality Outreach Report for *June 2020**is available via the
> Quality Wiki page*: **June 2020
> <https://wiki.openjdk.java.net/display/quality/Quality+Outreach+report+Jun...>
> *
>
>
> *__*
> Rgds,Rory
>
> [1]
> https://mail.openjdk.java.net/pipermail/jdk-dev/2020-July/004536.html
> [2] https://openjdk.java.net/jeps/3
> [3] https://openjdk.java.net/jeps/3#Fix-Request-Process
> [4] https://openjdk.java.net/jeps/3#Late-Enhancement-Request-Process
>
> --
> Rgds, Rory O'Donnell
> Quality Engineering Manager
> Oracle EMEA, Dublin, Ireland
>
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev(a)lists.jboss.org <mailto:hibernate-dev@lists.jboss.org>
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
--
Rgds, Rory O'Donnell
Quality Engineering Manager
Oracle EMEA, Dublin, Ireland
4 years, 4 months
Fwd: JDK 15 is now in Rampdown Phase Two
by Yoann Rodiere
FYI
Yoann Rodière
Hibernate Team
yoann(a)hibernate.org
---------- Forwarded message ---------
From: Yoann Rodiere <yrodiere(a)redhat.com>
Date: Fri, 17 Jul 2020 at 15:00
Subject: Re: [hibernate-dev] JDK 15 is now in Rampdown Phase Two
To: Rory O'Donnell <rory.odonnell(a)oracle.com>
Cc: Hibernate <hibernate-dev(a)lists.jboss.org>, Deepak Nenmelithara
Damodaran <deepak.n.damodaran(a)oracle.com>, Dalibor Topic <
dalibor.topic(a)oracle.com>, Balchandra Vaidya <balchandra.vaidya(a)oracle.com>
Hi Rory,
I confirm that Hibernate ORM and Hibernate Search run fine on JDK15-ea+32
[1][2].
I can't say for JDK16, since Gradle is giving me trouble and I haven't been
able to run tests on JDK16 yet.
[1] https://ci.hibernate.org/job/hibernate-orm-personal-yoann-jdk15/4/
[2]
https://ci.hibernate.org/blue/organizations/jenkins/hibernate-search/deta...
Regards,
Yoann Rodière
Sr. Software Engineer, Middleware Engineering, Hibernate team
Red Hat <https://www.redhat.com>
<https://www.redhat.com>
On Fri, 17 Jul 2020 at 10:49, Rory O'Donnell <rory.odonnell(a)oracle.com>
wrote:
> Hi Sanne, **
>
> *Per the JDK 15 schedule, we are in Rampdown Phase Two* *[1]*
>
> Per the JDK Release Process [2] we now turn our focus to *P1 and P2
> bugs*, which can be fixed with approval [3].
> Late enhancements are still possible, with approval [4], but the bar is
> now extraordinarily high.
>
> **Please advise if you have any open high priority issues.* *
>
> * Schedule for JDK 15
> o 2*020/07/16 Rampdown Phase Two*
> o 2020/08/06 Initial Release Candidate
> o 2020/08/20 Final Release Candidate
> o 2020/09/15 General Availability
>
> * Features included in JDK 15:
> o JEP 339: Edwards-Curve Digital Signature Algorithm (EdDSA)
> <http://openjdk.java.net/jeps/339>
> o JEP 360: Sealed Classes (Preview) <
> http://openjdk.java.net/jeps/360>
> o JEP 371: Hidden Classes <http://openjdk.java.net/jeps/371>
> o JEP 372: Remove the Nashorn JavaScript Engine
> <http://openjdk.java.net/jeps/372>
> o JEP 373: Reimplement the Legacy DatagramSocket API
> <https://openjdk.java.net/jeps/373>
> o JEP 374: Disable and Deprecate Biased Locking
> <http://openjdk.java.net/jeps/374>
> o JEP 375: Pattern Matching for instanceof (Second Preview)
> <https://openjdk.java.net/jeps/375>
> o JEP 377: ZGC: A Scalable Low-Latency Garbage Collector
> <http://openjdk.java.net/jeps/377>
> o JEP 378: Text Blocks <http://openjdk.java.net/jeps/378>
> o JEP 379: Shenandoah: A Low-Pause-Time Garbage Collector
> <https://openjdk.java.net/jeps/379>
> o JEP 381: Remove the Solaris and SPARC Ports
> <https://openjdk.java.net/jeps/381>
> o JEP 383: Foreign-Memory Access API (Second Incubator)
> <https://openjdk.java.net/jeps/383>
> o JEP 384: Records (Second Preview)
> <https://openjdk.java.net/jeps/384>
> o JEP 385: Deprecate RMI Activation for Removal
> <https://openjdk.java.net/jeps/385>
>
> *JDK 15 **Early Access build 32 **is available**at : - jdk.java.net/15/*
>
> These early-access, open-source builds are provided under the GNU
> General Public License, version 2, with the Classpath Exception.
>
> * Release notes
> o http://jdk.java.net/15/release-notes
> * Recent fixes that might be of interest
> o
>
> Build 32
>
> + 8231800: Better listing of arrays
> + 8234836: Improve serialization handling
> o Build 31
> + JDK-8248505: Unexpected NoSuchAlgorithmException when using
> secure random impl from BCFIPS provider
> o Build 29
> + JDK-8233014: Enable ShowCodeDetailsInExceptionMessages by
> default
>
> *JDK 16 Early Access build 6 ****is available**at : - jdk.java.net/16/*
>
> These early-access, open-source builds are provided under the GNU
> General Public License, version 2, with the Classpath Exception.
>
> * JEP Candidate
> o JEP 388: Windows/AArch64 Port <https://openjdk.java.net/jeps/388>
> * JEPs proposed to target
> o JEP 347: Enable C++14 Language Features
> <https://openjdk.java.net/jeps/347>
> * JEPs targeted to JDK 16, so far:
> o JEP 369: Migrate to GitHub <https://openjdk.java.net/jeps/369>
> o JEP 357: Migrate from Mercurial to Git
> <https://openjdk.java.net/jeps/357>
>
> **
>
> * Recent fixes that might be of interest
> o
>
> Build 32
>
> + 8231800: Better listing of arrays
> + 8234836: Improve serialization handling
> o Build 5
> + JDK-8218021: Have jarsigner preserve posix permission
> attributes
> + JDK-8245302: Upgrade LogRecord to support long thread ids
> and remove its usage of ThreadLocal
> + JDK-8248505: Unexpected NoSuchAlgorithmException when using
> secure random impl from BCFIPS provider
>
> *Cryptoroadmap updated *
>
> * https://www.java.com/en/jre-jdk-cryptoroadmap.html
>
> *The "Best of the JDK" feature face-off tournament: Result!*_*
> *_
>
> * *JDK Mission Control *is the winner based on the Twitter poll
> <https://twitter.com/java/status/1281595323685703683?s=20>.
>
> *The Quality Outreach Report for *June 2020**is available via the
> Quality Wiki page*: **June 2020
> <
> https://wiki.openjdk.java.net/display/quality/Quality+Outreach+report+Jun...
> >
> *
>
>
> *__*
> Rgds,Rory
>
> [1] https://mail.openjdk.java.net/pipermail/jdk-dev/2020-July/004536.html
> [2] https://openjdk.java.net/jeps/3
> [3] https://openjdk.java.net/jeps/3#Fix-Request-Process
> [4] https://openjdk.java.net/jeps/3#Late-Enhancement-Request-Process
>
> --
> Rgds, Rory O'Donnell
> Quality Engineering Manager
> Oracle EMEA, Dublin, Ireland
>
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
4 years, 4 months
JDK 15 is now in Rampdown Phase Two
by Rory O'Donnell
Hi Sanne, **
*Per the JDK 15 schedule, we are in Rampdown Phase Two* *[1]*
Per the JDK Release Process [2] we now turn our focus to *P1 and P2
bugs*, which can be fixed with approval [3].
Late enhancements are still possible, with approval [4], but the bar is
now extraordinarily high.
**Please advise if you have any open high priority issues.* *
* Schedule for JDK 15
o 2*020/07/16 Rampdown Phase Two*
o 2020/08/06 Initial Release Candidate
o 2020/08/20 Final Release Candidate
o 2020/09/15 General Availability
* Features included in JDK 15:
o JEP 339: Edwards-Curve Digital Signature Algorithm (EdDSA)
<http://openjdk.java.net/jeps/339>
o JEP 360: Sealed Classes (Preview) <http://openjdk.java.net/jeps/360>
o JEP 371: Hidden Classes <http://openjdk.java.net/jeps/371>
o JEP 372: Remove the Nashorn JavaScript Engine
<http://openjdk.java.net/jeps/372>
o JEP 373: Reimplement the Legacy DatagramSocket API
<https://openjdk.java.net/jeps/373>
o JEP 374: Disable and Deprecate Biased Locking
<http://openjdk.java.net/jeps/374>
o JEP 375: Pattern Matching for instanceof (Second Preview)
<https://openjdk.java.net/jeps/375>
o JEP 377: ZGC: A Scalable Low-Latency Garbage Collector
<http://openjdk.java.net/jeps/377>
o JEP 378: Text Blocks <http://openjdk.java.net/jeps/378>
o JEP 379: Shenandoah: A Low-Pause-Time Garbage Collector
<https://openjdk.java.net/jeps/379>
o JEP 381: Remove the Solaris and SPARC Ports
<https://openjdk.java.net/jeps/381>
o JEP 383: Foreign-Memory Access API (Second Incubator)
<https://openjdk.java.net/jeps/383>
o JEP 384: Records (Second Preview)
<https://openjdk.java.net/jeps/384>
o JEP 385: Deprecate RMI Activation for Removal
<https://openjdk.java.net/jeps/385>
*JDK 15 **Early Access build 32 **is available**at : - jdk.java.net/15/*
These early-access, open-source builds are provided under the GNU
General Public License, version 2, with the Classpath Exception.
* Release notes
o http://jdk.java.net/15/release-notes
* Recent fixes that might be of interest
o
Build 32
+ 8231800: Better listing of arrays
+ 8234836: Improve serialization handling
o Build 31
+ JDK-8248505: Unexpected NoSuchAlgorithmException when using
secure random impl from BCFIPS provider
o Build 29
+ JDK-8233014: Enable ShowCodeDetailsInExceptionMessages by
default
*JDK 16 Early Access build 6 ****is available**at : - jdk.java.net/16/*
These early-access, open-source builds are provided under the GNU
General Public License, version 2, with the Classpath Exception.
* JEP Candidate
o JEP 388: Windows/AArch64 Port <https://openjdk.java.net/jeps/388>
* JEPs proposed to target
o JEP 347: Enable C++14 Language Features
<https://openjdk.java.net/jeps/347>
* JEPs targeted to JDK 16, so far:
o JEP 369: Migrate to GitHub <https://openjdk.java.net/jeps/369>
o JEP 357: Migrate from Mercurial to Git
<https://openjdk.java.net/jeps/357>
**
* Recent fixes that might be of interest
o
Build 32
+ 8231800: Better listing of arrays
+ 8234836: Improve serialization handling
o Build 5
+ JDK-8218021: Have jarsigner preserve posix permission attributes
+ JDK-8245302: Upgrade LogRecord to support long thread ids
and remove its usage of ThreadLocal
+ JDK-8248505: Unexpected NoSuchAlgorithmException when using
secure random impl from BCFIPS provider
*Cryptoroadmap updated *
* https://www.java.com/en/jre-jdk-cryptoroadmap.html
*The "Best of the JDK" feature face-off tournament: Result!*_*
*_
* *JDK Mission Control *is the winner based on the Twitter poll
<https://twitter.com/java/status/1281595323685703683?s=20>.
*The Quality Outreach Report for *June 2020**is available via the
Quality Wiki page*: **June 2020
<https://wiki.openjdk.java.net/display/quality/Quality+Outreach+report+Jun...>
*
*__*
Rgds,Rory
[1] https://mail.openjdk.java.net/pipermail/jdk-dev/2020-July/004536.html
[2] https://openjdk.java.net/jeps/3
[3] https://openjdk.java.net/jeps/3#Fix-Request-Process
[4] https://openjdk.java.net/jeps/3#Late-Enhancement-Request-Process
--
Rgds, Rory O'Donnell
Quality Engineering Manager
Oracle EMEA, Dublin, Ireland
4 years, 4 months
Can a transient attribute be overridden to be persistent in a subclass?
by Gail Badner
I *think* the following is valid, but I need confirmation. This mapping
does seem to work for Hibernate.
A transient attribute, Employee#title, gets overridden as a persistent
attribute, Editor#title, stored in a column named "e_title".
Writer#title is also transient, but Writer#group uses the same "e_title"
column as a foreign key. That foreign key value is used to populate
Writer#title.
@Entity
@Table(name="Employee")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name="department")
public abstract class Employee {
private String name;
private String title;
@Id
public String getName() {
return name;
}
@Transient
public String getTitle() {
return title;
}
protected void setName(String name) {
this.name = name;
}
protected void setTitle(String title) {
this.title = title;
}
}
@Entity
public class Editor extends Employee {
@Column(name = "e_title")
public String getTitle() {
return super.getTitle();
}
public void setTitle(String title) {
super.setTitle( title );
}
}
@Entity
public class Writer extends Employee {
private Group group;
@ManyToOne(optional = false)
@JoinColumn(name = "e_title")
public Group getGroup() {
return group;
}
public void setGroup(Group group) {
this.group = group;
setTitle( group.getName() );
}
}
In 4.2, the above mapping worked with Employee#title being persistent, but
does not work in 5.3.
Section 2.2 Persistent Fields and Properties of the spec says:
"Entity subclasses may override the property accessor methods. However,
portable applications must not override the object/relational mapping
metadata that applies to the persistent fields or properties of entity
superclasses."
Would overriding a transient attribute be portable? If not, is that
something Hibernate would/should support?
Thanks,
Gail
4 years, 4 months
Bytecode enhancement as proxy
by andrea boriero
Hi all,
Last year the Bytecode enhancement as proxy feature was introduced (see
https://in.relation.to/2019/07/30/bytecode-proxy/ for details) and the
hibernate.bytecode.allow_enhancement_as_proxy was added to enable/disable
the new feature.
In ORM 5.3 and 5.4 versions this feature is disabled by default, I was
wondering if it is a good idea for the future ORM 5.5 release to make
it enabled by default.
Thanks,
Andrea
4 years, 4 months
[ORM] Query with condition on subclass attribute
by Gail Badner
Hi,
Given the following inheritance hierarchy:
@Entity
public class Person {
@Id
private int id;
...
}
@Entity
public class Employee extends Person {
private String title;
}
Executing a query like the following succeeds.
"from Person where title = 'abc'"
I thought that it would fail because Person does not have an attribute
named "title". Instead, the query succeeds and returns the Employee with
the specified title.
I don't see anything in the JPA spec that indicates whether this is
portable.
Does anyone know if this is portable?
Thanks,
Gail
4 years, 4 months