Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 289381 - update to JPA 2.0 API files
Summary: update to JPA 2.0 API files
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P2 critical (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-14 13:50 EDT by Linda DeMichiel CLA
Modified: 2022-06-09 10:25 EDT (History)
7 users (show)

See Also:


Attachments
JPA 2.0 PFD2 apis (222.22 KB, application/x-sdlc)
2009-09-14 13:50 EDT, Linda DeMichiel CLA
peter.krogh: iplog+
Details
ORM XSD (70.36 KB, application/octet-stream)
2009-09-14 13:51 EDT, Linda DeMichiel CLA
peter.krogh: iplog+
Details
persistence xsd (13.05 KB, application/octet-stream)
2009-09-14 13:51 EDT, Linda DeMichiel CLA
peter.krogh: iplog+
Details
Proposed patch including contributed code and EclipseLink specific fixes (869.21 KB, patch)
2009-09-16 11:26 EDT, Doug Clarke CLA
douglas.clarke: iplog+
douglas.clarke: review+
Details | Diff
Proposed patch - v2 (889.80 KB, patch)
2009-09-17 12:10 EDT, Doug Clarke CLA
peter.krogh: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Linda DeMichiel CLA 2009-09-14 13:50:24 EDT
Created attachment 147124 [details]
JPA 2.0 PFD2 apis

The current JPA 2.0 files used don't reflect the latest changes to the spec.
I am attaching the updated API files as a contribution.
Comment 1 Linda DeMichiel CLA 2009-09-14 13:51:16 EDT
Created attachment 147125 [details]
ORM XSD

Latest orm.xsd file
Comment 2 Linda DeMichiel CLA 2009-09-14 13:51:50 EDT
Created attachment 147126 [details]
persistence xsd

XSD for persistence.xml file
Comment 3 Doug Clarke CLA 2009-09-14 16:10:57 EDT
Is there any Java EE standard or convention for where the XSDs should be located in the JAR?
Comment 4 Doug Clarke CLA 2009-09-16 11:26:34 EDT
Created attachment 147334 [details]
Proposed patch including contributed code and EclipseLink specific fixes

This patch was made @ \trunk\jpa\plugins\javax.persistence\src\javax\persistence
Comment 5 Doug Clarke CLA 2009-09-16 11:31:59 EDT
The proposed patch has several open issues that need to be discussed and resolved:

1. I have added provider caching in PersistenceProviderResolver.DefaultPersistenceProviderResolver. Do we want this and if so should we make it a single threaded operation to re-build the list of providers?

2. There were several ignored exceptions when processing provider services files for available providers. Should we log issues encountered with found names or throw exceptions. Currently only a ClassCastException is possible

3. The org.eclipse.persistence.javax.persistence.osgi.Activator's provider caching and clear support needs to be reviewed. Does the collecting of providers using the services need to be single threaded? See new initializeProviders method

4. The org.eclipse.persistence.javax.persistence.osgi.Activator has a log method. Should it support plugging a java.util.Logger/Stream/writer?
Comment 6 Doug Clarke CLA 2009-09-17 12:10:59 EDT
Created attachment 147454 [details]
Proposed patch - v2
Comment 7 Doug Clarke CLA 2009-09-17 12:17:30 EDT
I have uploaded a second version of the patch. This version includes:

/javax.persistence 1.99/src/javax/persistence/spi/PersistenceProviderResolverHolder.java

- added support for tracking the service file URL with the provider name for diagnostics
- added java.util.logging support for FINEST debug messages and WARNING listing of providers when none are found but service files with values were found
- added support for ignoring ClassCastException when processing provider names
- enhanced the provider caching support to be a WeakHashMap keyed by ClassLoader

/javax.persistence 1.99/src/org/eclipse/persistence/javax/persistence/osgi/Activator.java

- Reverted implementation to previous caching of providers relying on bundle start discovery of providers and provider registry after start
- clearCachedProviders does nothing in this environment
- added java.util.logging support

The updated patch also includes 3 new classes that I accidentally missed making the first patch. The patch was built at:

/svnroot/rt/org.eclipse.persistence/trunk/jpa/plugins/javax.persistence
Comment 8 Doug Clarke CLA 2009-09-17 13:20:09 EDT
I also updates the bundle version to be 1.99.6 for PFD2
Comment 9 Peter Krogh CLA 2009-10-09 08:14:35 EDT
The API in trunk matches the most recent JPA 2.0 api.
Comment 10 Peter Krogh CLA 2010-12-08 14:21:49 EST
moved ipLog to patches.
Comment 11 Eclipse Webmaster CLA 2022-06-09 10:25:12 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink