[hibernate-dev] hibernate-osgi JPA bootstrap & classloader

Steve Ebersole steve at hibernate.org
Sat May 23 13:49:50 EDT 2015


As part of HHH-7527 (Enterprise OSGi support) you had changed
the org.hibernate.jpa.boot.spi.Bootstrap contract to basically overload
each method to additional accept a "providedClassLoader".

Every one of those methods however, also accepts
a org.hibernate.jpa.boot.spi.PersistenceUnitDescriptor which exposes 2
ClassLoader already.

Additionally, this ClassLoader is ultimately just used to build the
ClassLoaderService which hibernate-osgi overrides anyway.

Just curious if I missed something.  Unless I did, it seems to me that we
really do not need these overloads on Bootstrap to support Enterprise
OSGi.  This dove-tails with a discussion from the Karaf user list
ultimately discussing OsgiClassLoaderService and "holding bundles" that are
being re-installed or upgraded.  Ultimately I am thinking through ways to
support being able to release OSGI bundle references from the

More information about the hibernate-dev mailing list