@timothyjward , those 4 settings-provided classloaders are deprecated in master.  Instead, we check a collection given by "hibernate.classLoaders".  I'd rather stick to that in 4.2 too.

That being said, good catch -- it looks like the setting is completely ignored.  Rather than provide it here, I'd rather have Ejb3Configuration#buildEntityManagerFactory do it.

Also, it's important to keep ClassLoaderHelper.overridenClassLoader = osgiClassLoader; in start.  Unfortunately, there are still a lot of manual TCCL checks in 4.2.  That was a way to provide the OSGiClassLoader in every check.

So, I'd rather fix Ejb3Configuration#buildEntityManagerFactory, keep the current HibernateBundleActivator, and then the "hibernate.classLoaders" setting should work.  What do you think?