Also it appears that the Broker be loading classes from the thread
context class loader when persist is called.
-dain
On Dec 27, 2006, at 5:34 PM, Dain Sundstrom wrote:
I've been working on a getting JPA runtime enhancement and have run
into a problem where OpenJPA is loading my classes from the wrong
class loader. When I create a persistence unit info it supplies a
specific class loader for OpenJPA to use when resolving application
classes. When I execute a query the JPQLExpressionBuilder simply
uses getClass().getClassLoader() to load classes. In my case this
is the system class loader which contains unenhanced classes and
not the class loader for the persistence unit which has properly
enhanced classes.
It is my understand that OpenJPA should use the class loader
obtained from the PersistenceUnitInfo for all class loading. Is
this correct?
If that is correct, is this a bug in OpenJPA?
-dain