[hibernate-dev] Could we have a Hibernate 5.3 compatibility layer that includes the ORM 5.1 Hibernate Session class

Scott Marlow smarlow at redhat.com
Wed Jan 31 01:43:17 EST 2018


WildFly would like to have a version of 5.3+, that is compatible with ORM
5.1, with regard to the org.hibernate.session changes (including mapping of
exceptions thrown, so that the same exceptions are thrown).

Is it even possible to have an extra org.hibernate.Session interface + impl
(bridge) that matches the same session included in 5.1?  The impl would
delegate to the real underlying org.hibernate.Session impl classes and also
wrap thrown exceptions, so that Hibernate 5.1 native ORM apps, continue to
work without code changes

Or something like that.

I could see how some users wouldn't want to use the compatibility layer to
avoid extra overhead, so in WildFly, we would have to make that possible
also.

What do you think?

We would need something similar in ORM 6.0+ that is also compatible with
5.1, if this is possible.

Scott


More information about the hibernate-dev mailing list