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

Rick McGuire updated GERONIMO-4928:
-----------------------------------

    Fix Version/s: 3.0-M1
                       (was: 2.2)
                       (was: 2.1.4)
                       (was: 3.0)

> In the JPA persistence.xml loading code, exclude-unlisted-classes handling 
> 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) 
>          Components: deployment, persistence
>    Affects Versions: 2.1.4
>            Reporter: Quintin Beukes
>            Assignee: David Jencks
>             Fix For: 3.0-M1
>
>         Attachments: external-jpa-entity-reference.patch
>
>
> {panel:title=EJB 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]
>      • One or more object/relational mapping XML files
>      • One or more jar files that will be searched for classes
>      • An explicit list of the classes
>      • The annotated managed persistence classes contained in the root of the 
> persistence unit (unless
>          the exclude-unlisted-classes element is specified)
> {panel}
> {panel:title=further 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 only 
> the classes listed in <class> elements must be used in the PU. If it is 
> specified as false, then the annotated classes must be included. It's the 
> only thing that exclude-unlisted-classes affects. It doesn't affect classes 
> from other units, and if false it doesn't say that <class> must be ignored, 
> which is what the following code does in PersistenceUnitBuilder.java:
> {code:title=PersistenceUnitBuilder.java line 310|borderStyle=solid}
> if (excludeUnlistedClasses) {
>     gbeanData.clearAttribute("jarFileUrls");
> } else {
>     gbeanData.clearAttribute("managedClassNames");
> }
> {code}
> I removed the else block to leave:
> {code:title=PersistenceUnitBuilder.java Patched|borderStyle=solid}
> if (excludeUnlistedClasses) {
>     gbeanData.clearAttribute("jarFileUrls");
> }
> {code}
> Without this Geronimo isn't JavaEE 5 compliant.

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

Reply via email to