Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 312947

Summary: Allow EclipseLink JPA to work with Gemini in OSGi
Product: z_Archived Reporter: Tom Ware <tom.ware>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: lgalfaso, rick.sapir, shaun.smith
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: osgi
Bug Depends on:    
Bug Blocks: 294129    
Attachments:
Description Flags
Proposed changes
none
Changes to support Gemini JPA with Weaving
none
Changes to support Gemini JPA with Weaving
none
Changes to support Gemini JPA with Weaving
none
Changes to support Gemini JPA with Weaving
none
Changes to support Gemini JPA with Weaving none

Description Tom Ware CLA 2010-05-14 13:28:49 EDT

    
Comment 1 Tom Ware CLA 2010-05-14 13:34:24 EDT
Make necessary changes to allow EclipseLink JPA to work in OSGi in a specification-defined way in cooperation with the Eclipse Gemini project.

Gemini is the Reference Implementation for the OSGI Java EE integration specification.  It uses EclipseLink to provide its JPA service.

EclipseLink needs some modifications in order to work with the specification.

1. EclipseLink must import packages as javax.persistence 1.1.  We will also look for the jpa=2.0 property
2. EclipseLink JPA bundle activator must be able to work both in gemini mode or in our non-specification based mode that was distributed in 2.0


Our bundle activator issue will be tackled by providing a fragment that will be used to alter the behavior.  It must be installed in order to get our EclipseLink-specific behavior.

The javax.persistence bundle we ship will be updated to export packages with the property jap=2.0.  We will still export the packages as version 2.0.0.qualifier since any changes to this will cause us to have issues with getting old versions of this bundle.
Comment 2 Tom Ware CLA 2010-05-14 13:38:36 EDT
Created attachment 168570 [details]
Proposed changes

This patch includes changes listed above and additionally some updates to the manifests we use for our Eclipse projects to correct some versioning issues.
Comment 3 Tom Ware CLA 2010-05-14 13:49:00 EDT
This bug updates the way our OSGi functionality works on our org.eclipse.persistence.jpa bundle to work with the Eclipse Gemini project

Tested with Gemini tests and our OSGi demos

Review will be through discussion with Shaun Smith based on checked in code.
Comment 4 Rick Sapir CLA 2010-05-17 10:51:33 EDT
Added information to the 2.1 release notes
Comment 5 Tom Ware CLA 2010-05-31 10:22:41 EDT
*** Bug 288141 has been marked as a duplicate of this bug. ***
Comment 6 Tom Ware CLA 2010-05-31 11:10:04 EDT
*** Bug 239733 has been marked as a duplicate of this bug. ***
Comment 7 Shaun Smith CLA 2010-06-02 17:33:55 EDT
Created attachment 170885 [details]
Changes to support Gemini JPA with Weaving
Comment 8 Shaun Smith CLA 2010-06-02 17:43:18 EDT
This patch addresses three issues related to supporting byte code weaving in Gemini:
1) Static initialization of EntityManagerFactoryProvider collections and use of Hashtable instead of HashMap to improve thread safety
2) Removal of dead temporary class loader code as ASM is now used for meta-data  processing
3) Passing properties passed to createEntityManagerFactory through to JPAInitializer.registerTransformer(..)
Comment 9 Shaun Smith CLA 2010-06-03 07:38:46 EDT
Created attachment 170936 [details]
Changes to support Gemini JPA with Weaving

Updated patch with overlooked unnecessary import removed.
Comment 10 Tom Ware CLA 2010-06-04 09:05:32 EDT
Moving target milestone to 2.1.1, due because it is too late in the release cycle to include this change.
Comment 11 Shaun Smith CLA 2010-07-06 14:59:51 EDT
Created attachment 173586 [details]
Changes to support Gemini JPA with Weaving
Comment 12 Shaun Smith CLA 2010-07-12 15:08:01 EDT
Created attachment 174089 [details]
Changes to support Gemini JPA with Weaving

New patch that leaves "mostly" dead temploader code in place.
Comment 13 Shaun Smith CLA 2010-07-13 13:43:30 EDT
Created attachment 174185 [details]
Changes to support Gemini JPA with Weaving

Minor patch to pass user provided properties down to the method that creates a transformer and removal of temploader code from Equinox byte code weaving support as it is unnecessary (Bug 294129)
Comment 14 Shaun Smith CLA 2010-07-13 16:58:49 EDT
Patch reviewed by Andrei.

Committed to 2.1.1 in revision: 7811 
Committed to trunk in revision 7812
Comment 15 Eclipse Webmaster CLA 2022-06-09 10:36:00 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink