Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 56726 invoked from network); 25 Apr 2007 19:18:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Apr 2007 19:18:04 -0000 Received: (qmail 54029 invoked by uid 500); 25 Apr 2007 19:18:10 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 53901 invoked by uid 500); 25 Apr 2007 19:18:10 -0000 Mailing-List: contact open-jpa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: open-jpa-dev@incubator.apache.org Delivered-To: mailing list open-jpa-dev@incubator.apache.org Received: (qmail 53892 invoked by uid 99); 25 Apr 2007 19:18:10 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Apr 2007 12:18:10 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [68.142.206.240] (HELO smtp107.plus.mail.mud.yahoo.com) (68.142.206.240) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 25 Apr 2007 12:18:02 -0700 Received: (qmail 11672 invoked from network); 25 Apr 2007 19:17:41 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-YMail-OSG:Mime-Version:Content-Transfer-Encoding:Message-Id:Content-Type:To:From:Subject:Date:X-Mailer; b=sX05Xm1z4/z64uxpSQj1MylSIdIMq2754+i+14eqy4bCvbIIaW26gqkTbCEoorAQ+0RepaHu9BI1v4E0t/qlQvMOBXFFLqfg+Q2ZaEVdv5nSd5PFNhLbCbm9mlRTqGvLETUpimdyJy6QmRZW7N0sC7EXAM8hNSS3cNfFhMyb+mg= ; Received: from unknown (HELO ?10.11.55.8?) (david_jencks@63.105.20.225 with plain) by smtp107.plus.mail.mud.yahoo.com with SMTP; 25 Apr 2007 19:17:41 -0000 X-YMail-OSG: KLymXq0VM1kRDUEbQOBfx5jghGsQ2OE2hiMM23tVjp.KJ7YDV.CXLMuaS80x6FVo59q7P5RTEw-- Mime-Version: 1.0 (Apple Message framework v752.3) Content-Transfer-Encoding: 7bit Message-Id: <2E030A22-6873-4704-B904-1BE3830F4B29@yahoo.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: open-jpa-dev@incubator.apache.org From: David Jencks Subject: More questions on runtime schema generation Date: Wed, 25 Apr 2007 12:17:37 -0700 X-Mailer: Apple Mail (2.752.3) X-Virus-Checked: Checked by ClamAV on apache.org 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 getPersistentTypeNames if (names.isEmpty() && devpath) scan(new ClasspathMetaDataIterator(null, newMetaDataFilter()), 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? thanks david jencks