Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331108 - gemini jpa bundles affect non-OSGi use of eclipselink
Summary: gemini jpa bundles affect non-OSGi use of eclipselink
Status: CLOSED FIXED
Alias: None
Product: Gemini.JPA
Classification: RT
Component: Core (show other bugs)
Version: 1.0.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Shaun Smith CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 319765
Blocks:
  Show dependency tree
 
Reported: 2010-11-25 06:12 EST by Sahoo CLA
Modified: 2011-01-24 14:17 EST (History)
0 users

See Also:


Attachments
Removes initialization of EntityManagerFactoryProvider statics (1.92 KB, patch)
2010-12-07 12:11 EST, Shaun Smith CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.