[hibernate-dev] Jakarta EE: JPA 3.0 is coming
Steve Ebersole
steve at hibernate.org
Wed Mar 11 09:26:39 EDT 2020
When y'all talk about the bytecode enhancement solution, I'd like to better
understand what you mean exactly.
Do you mean at run-time like we did for ORM when we combined
Session/EntityManager? The problem there is that this only works when we
control the environment (WildFly e.g.). Do you mean at build-time?
Generally I am not a fan of either of these approaches.
My preference is based on the previous discussions that we intend no more
5.x release families (5.5, 5.6, etc). Given that I'd prefer that we:
1. Create a new 5.x family (5.5, 5.9, etc) that adds support for JPA 3
on top of 5.3. This would effectively "kill" 5.4. This new 5.x release
would be based on the JPA 3 API (renamed packages) and be able to read JPA
3 annotations. It would be nice if this version could read
javax.persistence annotation as well, but to me that is a nice-to-have.
None of us really has the time to tackle that work at the moment. And who
know, maybe a contributor takes that on.
2. Convert 6 to use JPA 3 API. I'd prefer to not support "dual
annotation reading" here - based simply on resources. This is a long term
view - moving forward I do not think it is reasonable expectation to use
JPA 3 API with JPA 2 annotations. That might (debatable) make sense for a
transitory period, but I'd rather not "waste" the effort here for 6.
For (1), in theory, I'd prefer to keep it using the JPA 2 API and read
both. However I suggested using the JPA 3 API there because I assume we
are going to need a JPA 3 compliant version sooner rather than later for
TCKs.
On Wed, Mar 11, 2020 at 3:51 AM Sanne Grinovero <sanne at hibernate.org> wrote:
> On Wed, 11 Mar 2020 at 08:39, Yoann Rodiere <yrodiere at redhat.com> wrote:
>
> > > Yet I'm convinced that having a release
> > > which provides full JPA 3.0 TCK between 5 and 6 (or however it gets
> > > renamed) would be no good to us, as it would create an adoption
> > > barrier for both cathegories of people: the ones not interested to
> > > migrate away from JPA2, and the ones not interested to migrate beyond
> > > JPA3.
> >
> > I get that, but I'm definitely not as hopeful as you are as to the
> > reliability of those bytecode hacks you mentioned. But I guess that's an
> > uphill battle.
> >
>
> I'm not a fan of bytecode hacks either, so maybe let's just see what a POC
> looks like before tearing it down?
>
> What's to stop you from supporting JPA2.0 in ORM 7, with the same hacks you
> > mentioned for JPA3?
> >
>
> Right, and in fact I mentioned as one of the possibilities for ORM6 to be
> able to read and interpret the "legacy" annotations from JPA2.
>
> I believe that's important to not get in the way of adoption but rather
> actively help with some flexibility, otherwise people will have a very hard
> time to upgrade to 6, and that's something that risks becoming a
> significant burden on us all.
>
> Thanks,
> Sanne
>
>
> > - People who want JPA3 only have a hack-free ORM 7 that happens to
> > support JPA2 annotations.
> > - People who want JPA2 can migrate to ORM 7, and we'll provide hacks
> > to make it work.
> >
> > At least we wouldn't be penalizing people who want to migrate to JPA3
> with
> > potentially unreliable bytecode hacks. Only people who want the latest
> and
> > greatest on an older API (which is, after all, quite an unreasonable
> > request) would have to put up with that.
> > And we'll be able to completely ignore these hacks in ORM 8 after we
> > rebased it on 7, since ORM 8 will drop support for JPA2 (I hope?).
> >
> > Yoann Rodière
> >
> > Sr. Software Engineer, Middleware Engineering, Hibernate team
> >
> > Red Hat <https://www.redhat.com>
> >
> > <https://www.redhat.com>
> >
> >
> > On Wed, 11 Mar 2020 at 00:17, Guillaume Smet <guillaume.smet at gmail.com>
> > wrote:
> >
> >> On Tue, Mar 10, 2020 at 7:12 PM Sanne Grinovero <sanne at hibernate.org>
> >> wrote:
> >>
> >> > The "big bang" approach that Validator implemented is an option as
> >> > well; but the context is a bit different as we're having an actual
> >> > major release being developed, and the matter of possible time
> >> > pressure.
> >> >
> >>
> >> Thus the proposal of Yoann and me to just rename the current 6 to a
> later
> >> version and release a new major version that only contains the Jakarta
> >> package change.
> >>
> >> That way, we don't end up doing additional work and having weird
> versions
> >> partially supporting both.
> >>
> >> --
> >> Guillaume
> >> _______________________________________________
> >> hibernate-dev mailing list
> >> hibernate-dev at lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/hibernate-dev
> >>
> >>
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
More information about the hibernate-dev
mailing list