org.hibernate.internal.util.ClassLoaderHelper is a hack around previous versions of Hibernate and its reliance on TCCL. It only has effect in OSGi environments. However it also caused a very bad design decision in hibernate-osgi in terms of the scoping of the OsgiClassLoaderService. That needs to be removed.
As it is done, it basically builds one ClassLoader for every OSGi deployment using our services. So if you deploy more than one bundle into an OSGi container and requesting persistence services from Hibernate they will all share the same ClassLoader made up of each other.
|