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

Bug 331108

Summary: gemini jpa bundles affect non-OSGi use of eclipselink
Product: [RT] Gemini.JPA Reporter: Sahoo <sanjeeb.sahoo>
Component: CoreAssignee: Shaun Smith <shaun.smith>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.0.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on: 319765    
Bug Blocks:    
Attachments:
Description Flags
Removes initialization of EntityManagerFactoryProvider statics none

Description Sahoo CLA 2010-11-25 06:12:59 EST
I see the following class in gemini/jpa bundle:
public class GeminiOSGiInitializer extends JavaSECMPInitializer {
  ...
    static {
        EntityManagerFactoryProvider.initialEmSetupImpls = new HashMap<String, EntityManagerSetupImpl>();
        EntityManagerFactoryProvider.initialPuInfos = new HashMap<String, SEPersistenceUnitInfo>();
    }
   ...
}    

Everytime this class is initialized, the static initializer cleans up any persistence units already created outside OSGi context. This affects usability of gemini/jpa bundles in an environment which support both OSGi and non-OSGi style use of JPA, e.g., glassfish.
Comment 1 Shaun Smith CLA 2010-12-07 12:11:17 EST
Created attachment 184735 [details]
Removes initialization of EntityManagerFactoryProvider statics
Comment 2 Shaun Smith CLA 2010-12-07 12:19:30 EST
With blocking Bug 319765 resolved the initialization code in GeminiOSGiInitializer can be removed.  The EclipseLink fix appears in nightly builds starting with 20101204.

Patch committed in SVN TX 90.
Comment 3 Shaun Smith CLA 2010-12-07 15:12:57 EST
The blocker bug is being reopened.
Comment 4 Shaun Smith CLA 2011-01-24 14:17:06 EST
Blocker bug resolved by Bug 332743.