This figure illustrates the relationship between EclipseLink components. Information stored in a database or in XML documents is transmitted to EclipseLink through a data source or JDBC.
EclipseLink contains EclipseLink Grid and EclipseLink. EclipseLink includes the open source implementation of the Java Persistence API (JPA) specification, plus extensions beyond what is defined in JPA. EclipseLink also includes the Java API for XML Binding (JAXB) specification. These extensions include persistence unit properties, query hints, annotations, EclipseLink's XML metadata, and EclipseLink's custom API. which contains JPA, JAX/SDO, and DBWS.
EclipseLink Grid enables you to scale out JPA applications using Oracle Coherence (Coherence) and to write to the grid. EclipseLink can be used by a variety of applications, including Java EE, EJB, JSF, JAX-WS, and JAX-RS. It can also be used in a number of different containers, including Tomcat and Jetty. It can also be used in standalone applications, such as in Java SE applications.
The EclipseLink Core provides the runtime component. Access to the runtime can be obtained directly through the EclipseLink API. The runtime environment is not a separate or external process—it is embedded within the application. Application calls invoke EclipseLink to provide persistence behavior. This function enables transactional and thread-safe access to shared database connections and cached objects.
The EclipseLink API provides the reference implementation for JPA 2.0 (JSR-317). The
org.eclipse.persistence.* classes encapsulate the EclipseLink API and provide extensions beyond the specification. These extensions include EclipseLink-specific properties and annotations. For more information on the API, properties and extensions, see Java Persistence API (JPA) Extensions Reference for EclipseLink.
The JAXB APIs are included in Java SE 6. In the
eclipselink.jar file, the
org.eclipse.persistence.jaxb.* classes encapsulate the EclipseLink support for JAXB.
JPA simplifies Java persistence. It provides an object-relational mapping approach that lets you declaratively define how to map Java objects to relational database tables in a standard, portable way. JPA works both inside a Java EE application server and outside an EJB container in a Java Standard Edition (Java SE) application. The main features included in the 2.0 JPA update are:
Expanded object/relational mapping functionality
Support for collections of embedded objects
Multiple levels of embedded objects
Combinations of access types
A criteria query API
Standardization of query "hints"
Standardization of additional metadata to support DDL generation
Support for validation
Object-XML, also known as MOXy, is an EclipseLink component that enables you to bind Java classes to XML schemas. Object-XML implements JAXB which lets you provide mapping information through annotations. Support for storing the mappings in XML format is provided by MOXy. The many advanced mappings that are available enable you to handle complex XML structures without having to mirror the schema in your Java class model.
The objects produced by the EclipseLink JAXB compiler are Java POJO models. They are generated with the necessary annotations required by the JAXB specification. The JAXB runtime API can be used to marshal and unmarshal objects.
When using Object-XML as the JAXB provider, no metadata is required to convert your existing object model to XML. You can supply metadata (using annotations or XML) only when you must fine-tune the XML representation of the model.
Using EclipseLink Object-XML, you can manipulate XML in the following ways:
Generate a Java Model from an XML schema
Specify the EclipseLink MOXy JAXB runtime
Use JAXB to manipulate XML
Generate an XML schema from a Java model
For more information on Object-XML and these use cases, see Developing JAXB Applications Using EclipseLink MOXy.
EclipseLink provides maximum flexibility with the ability to control how your object model is mapped to an XML schema. There are many advantages to having control over your own object model:
You can design the domain classes specifically for your application using the appropriate patterns and practices.
You can use XPath-based mapping. This prevents the need for having a 1-to-1 relationship between classes and XML schema types. For more information, see Developing JAXB Applications Using EclipseLink MOXy.
You can instantiate objects in a way that is appropriate to your application.
You can control your own class path dependencies. Most JAXB implementations put vendor specific code in the generated classes that add class path dependencies to your application.
One of the key advantages of EclipseLink is that the mapping information can be stored externally and does not require any changes to the Java classes or XML schema. This means that you can map your domain objects to more than one schema, or if your schema changes, you can update the mapping metadata instead of modifying your domain classes. This is also useful when mapping third-party classes, because you might not have access to the source to add annotations.
The Service Data Objects (SDO) component provides the reference implementation of Service Data Objects version 2.1.1. The reference implementation is described in JSR-235. The SDO implementation incorporates the reference implementation and provides additional features primarily used for converting Java objects to XML, and for building and using data object models that can be incorporated into service architectures.
SDO provides you with the following capabilities:
Use of the SDO APIs
Conversion an XML Schema
Customization of your XSD for SDO usage
Use of dynamic data objects to manipulate XML
Use of static data objects
Run the SDO compiler—generate type safe data objects
Use type safe data objects to manipulate XML
For more information, see "Getting Started with EclipseLink SDO" in the EclipseLink documentation:
Database Web Services (DBWS) enables simple and efficient access to relational database artifacts by using a web service. It provides Java EE-compliant client-neutral access to the database without having to write Java code. DBWS extends EclipseLink's core capabilities while using existing ORM and OXM components.
DBWS has a runtime provider component that takes a service descriptor (along with related deployment artifacts) and realizes it as a JAX-WS 2.0 Web service. The runtime provider uses EclipseLink to bridge between the database and the XML SOAP Messages used by web service clients. For information on DBWS architecture, see Developing Persistence Architectures Using EclipseLink.