| Summary: | Support for a persistence unit to encompass multiple bundles | ||
|---|---|---|---|
| Product: | [RT] Gemini.JPA | Reporter: | Michael Keith <michael.keith> |
| Component: | Core | Assignee: | Michael Keith <michael.keith> |
| Status: | NEW --- | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | cmordant1, cvgaviao, firedrago, gernot, gunnar, khertz, m, mku, peter.kullmann, thomas.gillet.2 |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Michael Keith
I think that the scenario of creating bundle fragments having the main persistence bundle as host should be considered too. Mike, Do you know if the new proposed version 5 of Enterprise Specs brings any changes related to this subject? There have been no revs to the OSGi JPA spec. I have been too busy to contribute anything there. Maybe in the next round, spec-wise. I haven't looked at this yet in Gemini JPA but there is a chance I might be able to get to it for the 1.1 release. I'll see how much work it is. -Mike I recently tried to put some entities in a fragment attached to a PU bundle with exclude-unlisted-classes set to false, and it worked perfectly fine: all unlisted entities have been found, including the ones in the fragment. There are still bugs #335698 and #337425 lying around unanswered, so I wonder, what is the "official" status for fragment support? Note: works with Gemini 1.0.0.RELEASE / EclipseLink 2.3.1 and above No, I am afraid it is just accidental. The classes may be getting found after resolve-time when the fragment is attached to the host bundle's class loader. This means there is a possibility that weaving may not work correctly if some other bundle loads the classes before they get woven. Was not able to get this feature in 1.1 but will try my best to put it in the next release. Noticed this method will need to be modified: ServicesUtil.buildServiceProperties We are getting scary log messages at startup just with a single bundle that contains all of our entities that uses enums defined in a different bundle (they are shared with view objects sent to the client). The root cause seems to be that MetadataAsmFactory.buildClassMetadata() is trying to load the shared enum classes via the correct bundle classloader for the parent bundle when that bundle is not actually initialized enough to reference its dependencies. Eventually this causes a ValidationException because it can't tell that the enum implements Serializable. It would be nice to see that fixed at least. A nice new documentation showing the EclipseLink support of multiple dbs using Composite Persistence Unit: http://www.eclipse.org/eclipselink/documentation/2.4/solutions/usingmultipledbs.htm |