I see how TemporaryClassLoader operates. We haven't been using 'getNewTempClassLoader' in the provider code as of yet. Let me poke around and see if I am overcomplicating the issue... I still don't understand how to push an enhanced class back into the app classloader space, but maybe I am wrong (still thinking in Cayenne classic terms), and this is not needed.

Andrus


On Feb 22, 2007, at 7:46 PM, Dain Sundstrom wrote:
Sorry, got busy and missed this email.

This is such a common problem, it was addressed directly by the JPA specs. When loading classes for inspection use the class loader returned from javax.persistence.spi.PersistenceUnitInfo.getNewTempClassLoader().

For Cayenne's own PersistenceUnitInfo implementation, I suggest you copy org.apache.openejb.core.TemporaryClassLoader which I copied from OpenJPA and cleaned up.

-dain

Reply via email to