openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Donald Woods (JIRA)" <j...@apache.org>
Subject [jira] Updated: (OPENJPA-1460) Fix scope visibility of orm.xml when it is packaged in both ear file and war file
Date Tue, 09 Feb 2010 18:03:28 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-1460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Donald Woods updated OPENJPA-1460:
----------------------------------

    Attachment: OPENJPA-1460-4.patch

Updated patch that can be applied to the latest trunk (r908071) code

> 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 element 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, or 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 generally 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 file within the EAR, the persistence unit of that name
defined at EAR level will not be visible to the components defined by that EJB-JAR, WAR, or
application jar file unless the persistence unit reference uses the persistence unit name
# syntax to specify a path name to disambiguate the reference. When the # syntax is used,
the path name is relative to the referencing application component jar file. For example,
the syntax ../lib/persistenceUnitRoot. jar#myPersistenceUnit refers to a persistence unit
whose name, as specified in the name element of the persistence.xml file, is myPersistenceUnit
and 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 unitName annotation element
> or persistence-unit-name deployment descriptor element to reference a persistence unit
defined at EAR level.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message