Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312692 - Transformers should be configured when Persistence Bundle registered
Summary: Transformers should be configured when Persistence Bundle registered
Status: CLOSED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard: osgi
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-12 15:15 EDT by Shaun Smith CLA
Modified: 2022-06-09 10:19 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shaun Smith CLA 2010-05-12 15:15:16 EDT
When a bundle containing persistence units is registered the persistence unit should be processed as is done by the Java Agent to ensure that byte code weaving transformers are registered as early as possible.  

I prototyped/hacked a solution to this by having OSGiPersistenceInitializationHelper.addBundle create an EntityManagerFactory for each persistence unit contained in a bundle.  Obviously this is not the right solution but it did achieve the end of having predeployment performed before client code eventually called createEntityManagerFactory (hopefully not having previously loaded Entity classes).

Most of the necessary predeployment code executed when starting with the agent is contained in JavaSECMPInitializer.  Ideally the required functionality would be refactored so it's available to EquinoxInitializer, and maybe OSGiInitializer.
Comment 1 Shaun Smith CLA 2010-05-12 15:16:33 EDT
The solution to this problem should be as cheap/quick to implement as possible as EclispeLink JPA OSGi support will be replaced by Gemini JPA.
Comment 2 Peter Krogh CLA 2010-06-04 14:39:17 EDT
2.1 Bug scrubbing, deferring to 2.1.1.
Comment 3 Shaun Smith CLA 2010-07-28 10:24:30 EDT
With the support in Gemini coming this optimization is unnecessary.
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:19:46 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink