Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 93843 invoked from network); 9 Feb 2010 20:59:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Feb 2010 20:59:52 -0000 Received: (qmail 93494 invoked by uid 500); 9 Feb 2010 20:59:51 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 93473 invoked by uid 500); 9 Feb 2010 20:59:51 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 93463 invoked by uid 99); 9 Feb 2010 20:59:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Feb 2010 20:59:51 +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; Tue, 09 Feb 2010 20:59:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id CA26D234C045 for ; Tue, 9 Feb 2010 12:59:27 -0800 (PST) Message-ID: <566439639.160441265749167812.JavaMail.jira@brutus.apache.org> Date: Tue, 9 Feb 2010 20:59:27 +0000 (UTC) From: "Pinaki Poddar (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Commented: (OPENJPA-1460) Fix scope visibility of orm.xml when it is packaged in both ear file and war file In-Reply-To: <1807240435.249631263511854554.JavaMail.jira@brutus.apache.org> 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/OPENJPA-1460?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D12= 831661#action_12831661 ]=20 Pinaki Poddar commented on OPENJPA-1460: ---------------------------------------- This change should not expose the persistent environment setting on to Open= JPAConfiguration interface. That method does not have a clear semantics to = be on the configuration interface. Please keep the method on OpenJPAConfigu= rationImpl and do a conditional cast to solve the problem at hand..=20 > Fix scope visibility of orm.xml when it is packaged in both ear file and = war file > -------------------------------------------------------------------------= -------- > > Key: OPENJPA-1460 > URL: https://issues.apache.org/jira/browse/OPENJPA-1460 > Project: OpenJPA > Issue Type: Bug > Components: jpa > Affects Versions: 2.0.0-M3, 2.0.0-beta > Reporter: Fay Wang > Assignee: Donald Woods > Fix For: 2.0.0 > > Attachments: OPENJPA-1460-1.patch, OPENJPA-1460-2.patch, OPENJPA-= 1460-3.patch, OPENJPA-1460-4.patch, OPENJPA-1460.patch > > > Per JPA 2.0 spec, section 8.2.2: > An EJB-JAR, WAR, application client jar, or EAR can define a persistence = unit. When referencing a persistence unit using the unitName annotation ele= ment or persistence-unit-name deployment descriptor element, the visibility= scope of the persistence unit is determined by its point of definition: > (1) A persistence unit that is defined at the level of an EJB-JAR, WAR, o= r application client jar is scoped to that EJB-JAR, WAR, or application jar= respectively and is visible to the components defined in that jar or war. > (2) A persistence unit that is defined at the level of the EAR is general= ly visible to all components in the application. However, if a persistence = unit of the same name is defined by an EJB-JAR, WAR, or application jar fil= e within the EAR, the persistence unit of that name defined at EAR level wi= ll not be visible to the components defined by that EJB-JAR, WAR, or applic= ation jar file unless the persistence unit reference uses the persistence u= nit name # syntax to specify a path name to disambiguate the reference. Whe= n the # syntax is used, the path name is relative to the referencing applic= ation component jar file. For example, the syntax ../lib/persistenceUnitRoo= t. jar#myPersistenceUnit refers to a persistence unit whose name, as specif= ied in the name element of the persistence.xml file, is myPersistenceUnit a= nd for which the relative path name of the root of the persistence unit is = ../lib/persistenceUnitRoot. jar. The # syntax may be used with both the uni= tName annotation element > or persistence-unit-name deployment descriptor element to reference a per= sistence unit defined at EAR level. --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.