openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <d...@iq80.com>
Subject Generation of entity classes
Date Sun, 31 Dec 2006 23:12:56 GMT
I working on an implementation of the EJB cmp specification which  
uses JPA under the covers to implement the persistence.  I have the  
basics working with hand written subclasses of the abstract cmp2  
beans.  I just wrote a code generator to replace my hand coded  
subclasses using ASM (which rocks), and I am having problems getting  
OpenJPA to enhance my generated class.  It appears that at the moment  
I construct the EMF all entity classes must be available via the temp  
class loader.  If they are not, OpenJPA will not add an entry into  
the MetaData repository.  Later when I generate my class and load it,  
the OpenJPA transformer looks for the MetaData in the repository,  
doesn't find it, and completely skips enhancement (PCEnhancer line  
322).  It is possible to have the enhancer fault load the metadata  
and continue with enhancement?

In the mean time, I'm going to hack OpenEJB to kick off generation  
very early in deployment, but it would be much more elegant to wait  
until the EJB is deployed to generate the classes and this happens  
after JPA is initialized.

Thanks,

-dain 

Mime
View raw message