Community
Participate
Working Groups
The current JPA Initialization code caches some of the constructs used for initialization in such a way as to potentially prevent redployment in Gemini and potentially cause memory leaks due to the fact that the inherited code assumes a Java SE-type deployment. We should clean-up the access to the static variables help by our deployment process such as the initial set of emSetupImpls and persistenceUnit infos. This clean-up will require changes to our legacy OSGi code to keep it working.
Created attachment 185314 [details] initial patch
Created attachment 185453 [details] updated patch The patch keeps all OSGi changes made in the initial patch. - back to singleton JavaSECMPInitializer - in agent case; - otherwise each getInitializer creates a new entity of JavaSECMPInitializer; - initialPuInfos and initialEmSetupImpls are kept on the initializer if keepAllPredeployedPersistenceUnits method returns true - currently should happen only for JavaSECMPInitializer with agent; - buried classloader in initializer so that they don't surface in PersistenceProvider code; - SEPersistenceInfo now created with both main and temp class loaders set to the initializationClassloader if the creating Initializer. - changed PersistenceUnit.getInitializer method to take puName and properties; - removed from PersistenceUnit the version of createEMF method that took class loader.
Checked in changes. Collectively developed and reviewed by Andrei Ilitchev and Tom Ware Tested with JPA and Core LRG and also with Gemini JPA tests along with change made for the cooresponding Gemini Bug 332743.
Created attachment 186178 [details] Fixes JavaSECMPInitializer to use initialPuInfos and emSetupImpls Fixes a problem introduced by the original patch - it completely switched off the usage of initialPuInfos and initialEmSetupImpls. That happened because keepAllPredeployedPersistenceUnits method was forgotten in JavaSECMPInitializer: JPAInitializer doesn't keep initials, but SE does in case the agent is used.
Created attachment 186275 [details] Fix for OSGi and Performance regression in previous fix (2.2 stream)
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink