On Wed, Feb 21, 2018 at 5:47 PM, James Perkins <jperkins@redhat.com> wrote:
With other Java EE 8 tech previews we handle it by loading the correct resource based on a system property. Is this not possible with Hibernate for some reason? For example have a look at the javax.validation.api module [1].

If we are running in EE 8 mode, the JPA container, should use/expose the JPA 2.2 SPEC jars, however, either Hibernate ORM 5.1 or 5.3 could be used.  Also, in EE 8 mode, applications should use Hibernate ORM 5.3 by default but could also Hibernate ORM 5.1.  In EE 7 mode, only the Hibernate ORM 5.1 jars should be available to applications.  I think this should work.  I have an alternative in mind, if this doesn't work but it has in the past (e.g. JPA 2.1 container implementation could work with JPA 1.0-2.0 persistence providers).

Since not all applications will want to use Hibernate ORM 5.3 by default (in EE 8 tech preview), I think we should have a system property way to change the default JPA persistence provider module name (to be handled by the JPA container).  
 


On Wed, Feb 21, 2018 at 1:20 PM, Scott Marlow <smarlow@redhat.com> wrote:

On Wed, Feb 21, 2018 at 3:36 PM, James Perkins <jperkins@redhat.com> wrote:
Is there a need to create a new module?

Yes, WildFly needs to keep including the current Hibernate ORM  5.1 jar for application compatibility but we also need to include the newer Hibernate ORM 5.3+ jar for EE 8/JPA 2.2 use.  So, we really need a new ORM module, since we will keep both Hibernate versions in WildFly for a while (ORM 5.3 may get swapped out with a newer version later, TBD).

Scott




--
James R. Perkins
JBoss by Red Hat