hibernate/hibernate-orm — pull request #558 by brmeyer (2013-07-29 21:58:16+00:00)
Title: HHH-8118 Create one OSGiClassLoader per persistence unit

Apologies for the huge PR...

This boiled down to wiring ClassLoaderService, ServiceRegistry, or BindingContext into dozens of sequences. Once all class and resource loading are 100% reliant on ClassLoaderService, instead of static CL fixes, we'll be able to fully support one CL per unit.

Areas still needing work:

1.) Dialects. Add ServiceRegistry to the static methods and the constructors?
2.) org.hibernate.engine.jdbc.*Proxy#getProxyClassLoader()
3.) org.hibernate.type. A few types do class lookups.

org.hibernate.cfg, org.hibernate.internal.util.xml, org.hibernate.mapping, etc. were ignored since they'll be removed or repurposed in 5.0.