Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 32948 invoked from network); 26 Oct 2009 07:34:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Oct 2009 07:34:23 -0000 Received: (qmail 49145 invoked by uid 500); 26 Oct 2009 07:34:22 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 49054 invoked by uid 500); 26 Oct 2009 07:34:22 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 49041 invoked by uid 99); 26 Oct 2009 07:34:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Oct 2009 07:34:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Oct 2009 07:34:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7129F234C04C for ; Mon, 26 Oct 2009 00:33:59 -0700 (PDT) Message-ID: <1669230690.1256542439462.JavaMail.jira@brutus> Date: Mon, 26 Oct 2009 07:33:59 +0000 (UTC) From: "David Jencks (JIRA)" To: dev@geronimo.apache.org Subject: [jira] Assigned: (GERONIMO-4928) In the JPA persistence.xml loading code, exclude-unlisted-classes handling not compliant with JPA3.0 spec In-Reply-To: <1076440946.1256330759497.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/GERONIMO-4928?page=3Dcom.atlas= sian.jira.plugin.system.issuetabpanels:all-tabpanel ] David Jencks reassigned GERONIMO-4928: -------------------------------------- Assignee: David Jencks > In the JPA persistence.xml loading code, exclude-unlisted-classes handlin= g not compliant with JPA3.0 spec > -------------------------------------------------------------------------= -------------------------------- > > Key: GERONIMO-4928 > URL: https://issues.apache.org/jira/browse/GERONIMO-4928 > Project: Geronimo > Issue Type: Bug > Security Level: public(Regular issues)=20 > Components: deployment, persistence > Affects Versions: 2.1.4 > Reporter: Quintin Beukes > Assignee: David Jencks > Fix For: 2.1.4, 2.2, 3.0 > > Attachments: external-jpa-entity-reference.patch > > > {panel:title=3DEJB 3.0 JPA spec FR, section 6.2.1.6} > The set of managed persistence classes that are managed by a persistence = unit is defined by using one or > more of the following:[41] > =E2=80=A2 One or more object/relational mapping XML files > =E2=80=A2 One or more jar files that will be searched for classes > =E2=80=A2 An explicit list of the classes > =E2=80=A2 The annotated managed persistence classes contained in the= root of the persistence unit (unless > the exclude-unlisted-classes element is specified) > {panel} > {panel:title=3Dfurther on in the same section} > All classes must be on the classpath to ensure that entity managers from = different persistence units that > map the same class will be accessing the same identical class. > {panel} > This says that if exclude-unlisted-classes is specified as true, then onl= y the classes listed in elements must be used in the PU. If it is s= pecified as false, then the annotated classes must be included. It's the on= ly thing that exclude-unlisted-classes affects. It doesn't affect classes f= rom other units, and if false it doesn't say that must be ignored, = which is what the following code does in PersistenceUnitBuilder.java: > {code:title=3DPersistenceUnitBuilder.java line 310|borderStyle=3Dsolid} > if (excludeUnlistedClasses) { > gbeanData.clearAttribute("jarFileUrls"); > } else { > gbeanData.clearAttribute("managedClassNames"); > } > {code} > I removed the else block to leave: > {code:title=3DPersistenceUnitBuilder.java Patched|borderStyle=3Dsolid} > if (excludeUnlistedClasses) { > gbeanData.clearAttribute("jarFileUrls"); > } > {code} > Without this Geronimo isn't JavaEE 5 compliant. --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.