EE8 preview mode: JPA 2.2 support: ability to enable latest Hibernate ORM

In  jpa

Overview

Support JPA 2.2 by including Hibernate ORM 5.3.x and matching dependencies.

The new libraries will be added in addition to the existing version of Hibernate ORM so that EE7 certification can happen via the existing implementations based on JPA 2.1.

The new Hibernate ORM version will need to be activated explicitly via the ee8.preview.mode=true flag.

An Hibernate ORM upgrade implies an Hibernate Search upgrade, which in turn implies an Apache Lucene upgrade.

Compatibility analysis of Hibernate ORM (from 5.1 to 5.3):

Compatibility analysis of Hibernate Search:

Compatibility analysis of the new Lucene version:

While most of the backwards compatibility issues have been resolved, some will need us to enable a Compatibility Transformer created by David LLoyd. A working proof of concept can be found here:

Issue Metadata

Issue

Dev Contacts

QE Contacts

TBD

Affected Projects or Components

Hibernate Search needs to be updated to match the new Hibernate ORM version.

Byte Buddy is a new dependency introduced by the new Hibernate ORM version.

WildFly clustering components need to integrate with both new and legacy 2nd Level Cache integrations.

JipiJapa is the WildFly component managing the JPA providers, needs to handle this.

David Lloyd created the Compatibility Transformer tool within WildFly which will be used to enhance backwards compatibility.

Other Interested Projects

Infinispan project created the compatible set of 2nd Level Cache components.

Requirements

Included JPA 2.2, Hibernate ORM 5.3+, Hibernate Search 5.10+ and have them automatically enabled when the ee8 preview mode is enabled.

Hard Requirements

EE7 compatibility not affected in this release, so using the existing Hibernate libraries by default.

When ee8.preview.mode=true is set, use the new libraries instead.

Nice-to-Have Requirements

It would be nice to have Hibernate ORM and Hibernate Search fully backwards compatible but this might not be possible during a single WildFly release cycle.

In particular verifying this accurately and implement further improvements will need more time and would benefit from users feedback.

Non-Requirements

This will not replace the existing Hibernate ORM 5.1.x version.

The legacy version will be removed once the transition to EE8 is complete.

Test Plan

Unchanged: the EE7 testsuite should be running using the default Hibernate ORM version, which is the existing version, just to confirm that this work didn’t introduce regressions.

Some basic tests to verify that the new Hibernate ORM is available when ee8.preview.mode=true is set would be welcome.