Return-Path: Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: (qmail 96324 invoked from network); 29 Mar 2011 09:27:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Mar 2011 09:27:22 -0000 Received: (qmail 91144 invoked by uid 500); 29 Mar 2011 09:27:22 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 91081 invoked by uid 500); 29 Mar 2011 09:27:21 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 91073 invoked by uid 99); 29 Mar 2011 09:27:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Mar 2011 09:27:21 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Mar 2011 09:27:17 +0000 Received: from jim.nabble.com ([192.168.236.80]) by sam.nabble.com with esmtp (Exim 4.69) (envelope-from ) id 1Q4VCR-0002f3-VQ for users@openjpa.apache.org; Tue, 29 Mar 2011 02:26:55 -0700 Date: Tue, 29 Mar 2011 02:26:55 -0700 (PDT) From: paulvitic To: users@openjpa.apache.org Message-ID: <1301390815968-6218352.post@n2.nabble.com> Subject: Merging modular persistence units MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, 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. (http://labs.bsb.com/2010/11/configuring-modular-jpa-applications-with-spring/) 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: http://openjpa.208410.n2.nabble.com/Merging-modular-persistence-units-tp6218352p6218352.html Sent from the OpenJPA Users mailing list archive at Nabble.com.