Why hibernate-core-6.6.4-FINAL imports com.ibm.websphere.jtaextensions?

Hi,
I tried to upgrade Hibernate to 6.6.4 in OSGI (Karaf) environment and failed. I failed because this bundle now imports com.ibm.websphere.jtaextensions and I don’t use websphere and cannot do it. Appeared that in the previous version 5, Hibernate also imported this package but the import was optional. Now it is mandatory.
I wonder why Hibernate needs it.

Thanks,
Yevgeny

Hibernate ORM does not support OSGi anymore. Previous versions had a dedicated OSGi module, but nobody maintained it or cared about it, so we decided to drop it.

However, Hibernate still uses bundles with manifests having Import-Package. Why does it import something from Websphere?

It looks like this Import-Package directive is generated because of a string constant in org.hibernate.engine.transaction.jta.platform.internal.WebSphereExtendedJtaPlatform which refers to com.ibm.websphere.jtaextensions.SynchronizationCallback within a Class.forName() call.
I don’t know if there is a purpose of keeping the Import-Package directive since we’re not supporting OSGi anymore, so if you propose removing it, I’m sure this would get fixed pretty fast if it serves no purpose. If that by chance also helps you to run within OSGi then I’d say go for it. Create a Jira issue for this improvement and a PR that removes all the bundle related information.

I would prefer if you separate Hibernate from Websphere moving the related code into a separate jar but I don’t want to direct you how to design your product.

Thank you,
Yevgeny