openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulvitic <>
Subject Merging modular persistence units
Date Tue, 29 Mar 2011 09:26:55 GMT

I am using openjpa 1.2.2 with spring. My project has multiple units that
have entity classes. I wanted to be able to declare my persistence units in
persistence.xml files within their own packages and merge these at runtime.
There is a nice article that demonstrates how to do this.
which works except that when I try to enhance my classes at loadtime with
openjpa enhancer (this is the enhancement strategy I have to adopt for
reasons beyond the scope of this post) I run into trouble.

The problem seems to be that at classload time openjpa enhancer is not aware
of the persistence classes that will later going to be found by spring and
it only checks what is available on the running applications
META/persistence.xml file. Since the application does not support
RuntimeUnenhancedClasses this later causes error. 

Is there a way to provide the openjpa loadtime enhancer with locations of
multiple persitence xml files in the classpath so that it enhances the
classes declared in all of these?

Thank you.    

View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message