@brampouwelse what do you mean by requestingBundle? I think the correct classloader would be the classloader of the bundle containing the persistence unit. In aries jpa we set this classloder in the PersistenceUnitInfo. So hibernate could simply use this one. The javadoc of PersistenceUnitInfo also says "getClassLoader() Returns ClassLoader that the provider may use to load any classes, resources, or open URLs. ". So I think this is what the spec recommends to use.
|