openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject More questions on runtime schema generation
Date Wed, 25 Apr 2007 19:17:37 GMT
I'm working on modifications so that ddl can operate in a separate  
transaction on a connection from the jta ds and I would like to have  
a complete scan and enhancement as soon as possible when the EMF is  
first accessed.  I have this working when the classes are listed  
explicitly in the persistence.xml but not when they aren't.

It looks like the relevant code is AbstractCFMetaDataFactory  

             if (names.isEmpty() && devpath)
                 scan(new ClasspathMetaDataIterator(null,  
                     newClassArgParser(), names, false, null);

However IIUC this dissects the system property java.class.path and  
only parses stuff on that.  This might be reasonable for a command  
line tool (although I have some doubts) but it seems to me that for  
any other situation a scan of the provided classloader would be more  
appropriate.  Is this reasonable?

Also, I would like to suggest a flag in the  
openjpa.jdbc.SynchronizeMappings=buildSchema(...) stuff to turn on  
this eager scanning I'm trying to implement.  Does this seem reasonable?

david jencks

View raw message