You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Quintin Beukes (JIRA)" <ji...@apache.org> on 2009/10/23 22:45:59 UTC
[jira] Created: (GERONIMO-4928) In the JPA persistence.xml loading
code, exclude-unlisted-classes handling not compliant with JPA3.0 spec
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
Fix For: 2.2, 3.0, 2.1.4
According to the final release of the EJB 3.0 JPA spec, 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)
... further on...
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.
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:
if (excludeUnlistedClasses) {
gbeanData.clearAttribute("jarFileUrls");
} else {
gbeanData.clearAttribute("managedClassNames");
}
I removed the else block to leave:
if (excludeUnlistedClasses) {
gbeanData.clearAttribute("jarFileUrls");
}
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.
[jira] Updated: (GERONIMO-4928) In the JPA persistence.xml loading
code, exclude-unlisted-classes handling not compliant with JPA3.0 spec
Posted by "Rick McGuire (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Closed: (GERONIMO-4928) In the JPA persistence.xml loading
code, exclude-unlisted-classes handling not compliant with JPA3.0 spec
Posted by "David Jencks (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-4928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Jencks closed GERONIMO-4928.
----------------------------------
Resolution: Fixed
I had thought that scanning when there were also listed classes caused tck problems, but I can't find any. I applied the patch to 2.2 (rev 829715) and trunk (rev 829716). Thanks!
> 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: 2.2, 3.0, 2.1.4
>
> 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.
[jira] Updated: (GERONIMO-4928) In the JPA persistence.xml loading
code, exclude-unlisted-classes handling not compliant with JPA3.0 spec
Posted by "Quintin Beukes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-4928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Quintin Beukes updated GERONIMO-4928:
-------------------------------------
Attachment: external-jpa-entity-reference.patch
Changes the handling of exclude-unlisted-classes
> 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
> Fix For: 2.1.4, 2.2, 3.0
>
> Attachments: external-jpa-entity-reference.patch
>
>
> According to the final release of the EJB 3.0 JPA spec, 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)
> ... further on...
> 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.
> 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:
> if (excludeUnlistedClasses) {
> gbeanData.clearAttribute("jarFileUrls");
> } else {
> gbeanData.clearAttribute("managedClassNames");
> }
> I removed the else block to leave:
> if (excludeUnlistedClasses) {
> gbeanData.clearAttribute("jarFileUrls");
> }
> 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.
[jira] Updated: (GERONIMO-4928) In the JPA persistence.xml loading
code, exclude-unlisted-classes handling not compliant with JPA3.0 spec
Posted by "Quintin Beukes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-4928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Quintin Beukes updated GERONIMO-4928:
-------------------------------------
Description:
{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.
was:
According to the final release of the EJB 3.0 JPA spec, 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)
... further on...
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.
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:
if (excludeUnlistedClasses) {
gbeanData.clearAttribute("jarFileUrls");
} else {
gbeanData.clearAttribute("managedClassNames");
}
I removed the else block to leave:
if (excludeUnlistedClasses) {
gbeanData.clearAttribute("jarFileUrls");
}
Without this Geronimo isn't JavaEE 5 compliant.
Edited the JIRA to add some formatting for readability.
> 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
> Fix For: 2.1.4, 2.2, 3.0
>
> 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.
[jira] Assigned: (GERONIMO-4928) In the JPA persistence.xml loading
code, exclude-unlisted-classes handling not compliant with JPA3.0 spec
Posted by "David Jencks (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-4928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Jencks reassigned GERONIMO-4928:
--------------------------------------
Assignee: David Jencks
> 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: 2.1.4, 2.2, 3.0
>
> 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.