Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "EclipseLink/Development/DBWS/oNmMetadata"
< EclipseLink | Development | DBWS
(→New 'oNm' Metadata) |
|||
Line 1: | Line 1: | ||
− | == | + | == DBWS and new 'oNm' metadata format == |
+ | |||
+ | === Issues Summary === | ||
At some point in the future, DBWS will switch from using 'native' EclipseLink metadata (a.k.a. Project deployment xml) | At some point in the future, DBWS will switch from using 'native' EclipseLink metadata (a.k.a. Project deployment xml) | ||
to using 'oxm' and 'orm' (a.k.a JPA-style) metadata formats. In addition to using the new metadata formats, DBWS typically | to using 'oxm' and 'orm' (a.k.a JPA-style) metadata formats. In addition to using the new metadata formats, DBWS typically | ||
Line 5: | Line 7: | ||
persistent model classes. | persistent model classes. | ||
− | === | + | === General Solution === |
− | + | === Requirements === | |
* the 'oNm.xml' metadata must support the majority of EclipseLink features (1:1, 1:M, M:N, queries) | * the 'oNm.xml' metadata must support the majority of EclipseLink features (1:1, 1:M, M:N, queries) | ||
** NB: currently, new metadata formats do not support all EclipseLink features, not even all features required by DBWS (e.g. [https://bugs.eclipse.org/bugs/show_bug.cgi?id=211299 211299], [https://bugs.eclipse.org/bugs/show_bug.cgi?id=221876 221876]) | ** NB: currently, new metadata formats do not support all EclipseLink features, not even all features required by DBWS (e.g. [https://bugs.eclipse.org/bugs/show_bug.cgi?id=211299 211299], [https://bugs.eclipse.org/bugs/show_bug.cgi?id=221876 221876]) | ||
Line 13: | Line 15: | ||
* an in-memory model of the metadata can be read in from an 'oNm.xml' file (or stream, URL, etc.) without persistent model classes on the classpath. | * an in-memory model of the metadata can be read in from an 'oNm.xml' file (or stream, URL, etc.) without persistent model classes on the classpath. | ||
* an in-memory model of the metadata can be serialized to a file (or stream, URL, etc.) without persistent model classes on the classpath. | * an in-memory model of the metadata can be serialized to a file (or stream, URL, etc.) without persistent model classes on the classpath. | ||
− | |||
− | |||
− | |||
− | |||
* an in-memory model of the 'oNm' metadata can be realized into runtime artifacts, including generating persistent model classes. | * an in-memory model of the 'oNm' metadata can be realized into runtime artifacts, including generating persistent model classes. | ||
* generated persistent model classes must work when mapped simultaneously by both an orm and oxm metadata model. <br/> i.e. a generated class must support the following: a row is retrieved from the database, built into an object and that very same object is serialized to XML (and vice-versa). | * generated persistent model classes must work when mapped simultaneously by both an orm and oxm metadata model. <br/> i.e. a generated class must support the following: a row is retrieved from the database, built into an object and that very same object is serialized to XML (and vice-versa). | ||
* the existing multiple solutions for dynamic generation of persistent model classes (<code>o.e.p.sdo.helper.DynamicClassWriter</code> and <code>o.e.p.internal.dynamicpersist.BaseEntityClassLoader</code>) are re-factored to a single common solution. | * the existing multiple solutions for dynamic generation of persistent model classes (<code>o.e.p.sdo.helper.DynamicClassWriter</code> and <code>o.e.p.internal.dynamicpersist.BaseEntityClassLoader</code>) are re-factored to a single common solution. | ||
+ | |||
+ | === Open Issues === | ||
+ | |||
+ | === Work Required === |
Revision as of 10:57, 4 June 2009
Contents
DBWS and new 'oNm' metadata format
Issues Summary
At some point in the future, DBWS will switch from using 'native' EclipseLink metadata (a.k.a. Project deployment xml) to using 'oxm' and 'orm' (a.k.a JPA-style) metadata formats. In addition to using the new metadata formats, DBWS typically operates without persistent model classes; thus at runtime, a dynamic solution is required for the generation of persistent model classes.
General Solution
Requirements
- the 'oNm.xml' metadata must support the majority of EclipseLink features (1:1, 1:M, M:N, queries)
- as there are no persistent model classes on the classpath, processing the metadata must use only simple scalar objects (Strings, booleans, numbers, etc.) for all capabilities and settings.
- an in-memory model of the metadata can be read in from an 'oNm.xml' file (or stream, URL, etc.) without persistent model classes on the classpath.
- an in-memory model of the metadata can be serialized to a file (or stream, URL, etc.) without persistent model classes on the classpath.
- an in-memory model of the 'oNm' metadata can be realized into runtime artifacts, including generating persistent model classes.
- generated persistent model classes must work when mapped simultaneously by both an orm and oxm metadata model.
i.e. a generated class must support the following: a row is retrieved from the database, built into an object and that very same object is serialized to XML (and vice-versa). - the existing multiple solutions for dynamic generation of persistent model classes (
o.e.p.sdo.helper.DynamicClassWriter
ando.e.p.internal.dynamicpersist.BaseEntityClassLoader
) are re-factored to a single common solution.