I think I understand the point -- version conflicts were certainly a concern that I hadn't gotten to yet...

However, if you entities, etc. spread across multiple Bundles, will the PersistenceUnitInfo#getClassLoader() be able to load from all of them?  How does that ClassLoader know what to include?  How specific is that to the given OSGi container implementation?  Will that affect Hibernate's need to scan for orm.xml, legacy mapping XML files, entities, etc. not explicitly identified in the persistence unit?

One other concern is that org.hibernate.service.classloading.internal.ClassLoaderServiceImpl currently aggregates the overridenClassLoader (OsgiClassLoader) with core, TCCL, and getSystemClassLoader().  All ClassLoaders are iterated over until the class/resource is found.  We might have to override this entire service to ensure that additional, conflicting ClassLoaders aren't automatically grabbed.

Here's another one.  In a container-managed environment (Aries, etc.), isn't there only one PersistenceUnit per runtime?  I thought all app-provided units were aggregated into one.  Does that change anything?

Apologies for the slew of questions -- you definitely have some great points that were overlooked.  I just want to make sure we do it in the best way.