|
@Steven Ebersole what do you mean by requesting bundle? The bundle that creates the EntityManagerFactory? I think this is not necessarily the correct classloader. For example aries jpa creates the EntityManagerFactory but its classloader has no access to the entity classes. So for the container managed case I think the only safe way is to use the classloader that is supplied in the PersistenceUnitInfo (I hope it is mandatory to set a classloader there). In the application managed case the requesting bundle probably is a good guess for the correct classloader but there should always be a defined way to override this by supplying another class loader.
|