blob: 23c4213c25651bc2d9078bfbf38184fdd9312fa9 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<title>Key Components | EclipseLink 3.0.x Understanding EclipseLink</title>
<meta name="generator" content="Oracle DARB XHTML Converter (Mode = document) - Version 1.0.22 Build 1" />
<meta name="date" content="2014-06-10T10:39:51Z" />
<meta name="robots" content="noarchive" />
<meta name="doctitle" content="Key Components" />
<meta name="relnum" content="3.0" />
<link rel="stylesheet" type="text/css" href="../../dcommon/style.css" media="screen" />
<link rel="copyright" href="../../dcommon/html/cpyr.htm" title="Copyright" type="text/html" />
<link rel="start" href="../../index.htm" title="Home" type="text/html" />
<link rel="contents" href="toc.htm" title="Contents" type="text/html" />
<link rel="prev" href="general003.htm" title="Previous" type="text/html" />
<link rel="next" href="general005.htm" title="Next" type="text/html" />
<!-- START: Disqus --><script type="text/javascript"> var disqus_developer = 0; </script><!-- END: Disqus --><!-- START: Sharethis --><script type="text/javascript">var switchTo5x=true;</script><script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script><script type="text/javascript" src="http://s.sharethis.com/loader.js"></script> <!-- END: Sharethis --></head>
<body bgcolor="#FFFFFF"><iframe id="docheader" frameborder="0" framemargin="0" scrolling="no" src="../../dcommon/header.html"></iframe><script src="http://www.google.com/jsapi" type="text/javascript"></script><script type="text/javascript"> google.load('search', '1', {language : 'en'}); google.setOnLoadCallback(function() { var customSearchOptions = {}; var googleAnalyticsOptions = {}; googleAnalyticsOptions['queryParameter'] = 'q'; googleAnalyticsOptions['categoryParameter'] = ''; customSearchOptions['googleAnalyticsOptions'] = googleAnalyticsOptions; var customSearchControl = new google.search.CustomSearchControl( '016171230611334810008:mdbgdwjv8zu', customSearchOptions); customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET); var options = new google.search.DrawOptions(); options.setSearchFormRoot('cse-search-form'); customSearchControl.draw('cse', options); }, true);</script><link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" /><div id="cse" style="width:100%;"></div>
<div class="header"><a id="top" name="top"></a>
<table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td align="left" valign="top"><div class="booktitle">Understanding EclipseLink,
<b>3.0</b><br /></font></td>
<td valign="bottom" align="right" width="144">
<table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td>&nbsp;</td>
<td align="center" valign="top"><a href="toc.htm"><img src="../../dcommon/images/contents.png" alt="Go To Table Of Contents" border="0" height="16" width="16" /><br />
</td><td>&nbsp;</td><td align="center"><a href="../../" target="_top" class="external text" title="Search" rel="nofollow"><img src="../../dcommon/images/search.png" alt="Search" style="border:0;" /><br /><span class="mini"></span></a></td><td>&nbsp;</td><td align="center"><a href="../eclipselink_otlcg.pdf" title="PDF" target="_blank"><img src="../../dcommon/images/pdf_icon.png" style="padding-right:5px;border:0" alt="PDF"></a></td>
</tr>
</table>
</td>
</tr>
</table>
<hr />
<table class="navigation simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100" align="center">
<tr>
<td align="center"><a href="general003.htm"><img src="../../dcommon/images/larrow.png" alt="Previous" border="0" height="16" width="16" /></a></td>
<td align="center"><a href="general005.htm"><img src="../../dcommon/images/rarrow.png" alt="Next" border="0" height="16" width="16" /></a></td>
<td>&nbsp;</td>
</tr>
</table>
</div>
<!-- class="header" -->
<div class="ind"><!-- End Header --><a id="CHDIEEHG" name="CHDIEEHG"></a><a id="OTLCG114" name="OTLCG114"></a>
<div class="sect1"><!-- infolevel="all" infotype="General" -->
<h1 class="sect1"><font face="arial, helvetica, sans-serif" color="#330099">Key Components</font></h1>
<p><a href="#CHDGIFIA">Figure 1-1</a> illustrates the components contained by EclipseLink. The following sections describe the components.</p>
<div class="figure"><a id="CHDGIFIA" name="CHDGIFIA"></a><a id="OTLCG115" name="OTLCG115"></a>
<p><strong><em><font face="arial, helvetica, sans-serif">Figure 1-1 EclipseLink Components</font></em></strong></p>
<img src="img/otlcg_jd_002_eclipselink.png" alt="This figure is described in the text." title="This figure is described in the text." longdesc="img_text/otlcg_jd_002_eclipselink.htm" /><br />
<a id="sthref7" name="sthref7" href="img_text/otlcg_jd_002_eclipselink.htm">Description of "Figure 1-1 EclipseLink Components"</a><br />
<br /></div>
<!-- class="figure" -->
<a id="OTLCG116" name="OTLCG116"></a>
<div class="sect2"><!-- infolevel="all" infotype="General" --><a id="sthref8" name="sthref8"></a>
<h2 class="sect2"><font face="arial, helvetica, sans-serif" color="#330099">EclipseLink Core and API</font></h2>
<p>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&mdash;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.</p>
<p>The EclipseLink API provides the reference implementation for JPA 2.0 (JSR-338). The <code>org.eclipse.persistence.*</code> 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 <em>Jakarta Persistence API (JPA) Extensions Reference for EclipseLink</em>.</p>
<p>The JAXB APIs are included in Java SE 6. In the <code>eclipselink.jar</code> file, the <code>org.eclipse.persistence.jaxb.*</code> classes encapsulate the EclipseLink support for JAXB.</p>
</div>
<!-- class="sect2" -->
<a id="OTLCG117" name="OTLCG117"></a>
<div class="sect2"><!-- infolevel="all" infotype="General" --><a id="sthref9" name="sthref9"></a>
<h2 class="sect2"><font face="arial, helvetica, sans-serif" color="#330099">Object-Relational (JPA 2.2) Component</font></h2>
<p>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 Jakarta EE application server and outside an EJB container in a Java Standard Edition (Java SE) application. The main features included in the 2.2 JPA update are:</p>
<ul>
<li>
<p>Expanded object/relational mapping functionality</p>
<ul>
<li>
<p>Support for collections of embedded objects</p>
</li>
<li>
<p>Multiple levels of embedded objects</p>
</li>
<li>
<p>Ordered lists</p>
</li>
<li>
<p>Combinations of access types</p>
</li>
</ul>
</li>
<li>
<p>A criteria query API</p>
</li>
<li>
<p>Standardization of query "hints"</p>
</li>
<li>
<p>Standardization of additional metadata to support DDL generation</p>
</li>
<li>
<p>Support for validation</p>
</li>
</ul>
</div>
<!-- class="sect2" -->
<a id="CIHGBECC" name="CIHGBECC"></a>
<div class="sect2"><!-- infolevel="all" infotype="General" -->
<h2 class="sect2"><font face="arial, helvetica, sans-serif" color="#330099">JAXB Component</font></h2>
<p>JAXB is a Java API that allows a Java program to access an XML document by presenting that document to the program in a Java format. This process, called binding, represents information in an XML document as an object in computer memory. In this way, applications can access the data in the XML from the object rather than using the Domain Object Model (DOM) or the Streaming API for XML (SAX) to retrieve the data from a direct representation of the XML itself. Usually, an XML binding is used with JPA entities to create a data access service by leveraging a JAX-WS or JAX-RS implementation. Both of these Web Service standards use JAXB as the default binding layer. This service provides a means to access data exposed by JPA across computers, where the client computer might or might not be using Java.</p>
<p>JAXB uses an extended set of annotations to define the binding rules for Java-to-XML mapping. These annotations are subclasses of the <code>jakarta.xml.bind.</code><em><code>*</code></em> packages in the EclipseLink API. For more information about these annotations, see <em>Java API Reference for EclipseLink</em>.</p>
<p>For more information about JAXB, see "Java Architecture for XML Binding (JAXB)" at:</p>
<p><code><a href="http://www.eclipse.org/eclipselink/moxy.php">http://www.eclipse.org/eclipselink/moxy.php</a></code></p>
</div>
<!-- class="sect2" -->
<a id="CIHJDGEC" name="CIHJDGEC"></a><a id="OTLCG118" name="OTLCG118"></a>
<div class="sect2"><!-- infolevel="all" infotype="General" -->
<h2 class="sect2"><font face="arial, helvetica, sans-serif" color="#330099">MOXy Component</font></h2>
<p><em>MOXy</em> (also known as Object-XML) is the EclipseLink JAXB implementation. This component enables you to bind Java classes to XML schemas. MOXy 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.</p>
<p>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.</p>
<p>When using MOXy 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.</p>
<p>Using EclipseLink MOXy, you can manipulate XML in the following ways:</p>
<ul>
<li>
<p>Generate a Java Model from an XML schema</p>
</li>
<li>
<p>Specify the EclipseLink MOXy JAXB runtime</p>
</li>
<li>
<p>Use JAXB to manipulate XML</p>
</li>
<li>
<p>Generate an XML schema from a Java model</p>
</li>
</ul>
<p>For more information on MOXy and these use cases, see <em>Developing JAXB Applications EclipseLink MOXy</em>.</p>
<p>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:</p>
<ul>
<li>
<p>You can design the domain classes specifically for your application using the appropriate patterns and practices.</p>
</li>
<li>
<p>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 <em>Developing JAXB Applications EclipseLink MOXy</em>.</p>
</li>
<li>
<p>You can instantiate objects in a way that is appropriate to your application.</p>
</li>
<li>
<p>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.</p>
</li>
</ul>
<p>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.</p>
<a id="OTLCG119" name="OTLCG119"></a>
<div class="sect3"><!-- infolevel="all" infotype="General" --><a id="sthref10" name="sthref10"></a>
<h3 class="sect3"><font face="arial, helvetica, sans-serif" color="#330099">SDO Component</font></h3>
<p>The Service Data Objects (SDO) component provides the reference implementation of Service Data Objects version 2.1.1. The reference implementation is described in <a href="http://jcp.org/en/home/index">JSR-235</a>. 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.</p>
<p>SDO provides you with the following capabilities:</p>
<ul>
<li>
<p>Use of the SDO APIs</p>
</li>
<li>
<p>Conversion an XML Schema</p>
</li>
<li>
<p>Customization of your XSD for SDO usage</p>
</li>
<li>
<p>Use of dynamic data objects to manipulate XML</p>
</li>
<li>
<p>Use of static data objects</p>
<ul>
<li>
<p>Run the SDO compiler&mdash;generate type safe data objects</p>
</li>
<li>
<p>Use type safe data objects to manipulate XML</p>
</li>
</ul>
</li>
</ul>
<p>For more information, see "Getting Started with EclipseLink SDO" in the EclipseLink documentation:</p>
<p><code><a href="http://www.eclipse.org/eclipselink/moxy.php">http://www.eclipse.org/eclipselink/moxy.php</a></code></p>
</div>
<!-- class="sect3" --></div>
<!-- class="sect2" -->
<a id="CHDIGIDF" name="CHDIGIDF"></a><a id="OTLCG120" name="OTLCG120"></a>
<div class="sect2"><!-- infolevel="all" infotype="General" -->
<h2 class="sect2"><font face="arial, helvetica, sans-serif" color="#330099">Database Web Services Component</font></h2>
<p>Database Web Services (DBWS) enables simple and efficient access to relational database artifacts by using a web service. It provides Jakarta 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.</p>
<p>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 <em>Developing Persistence Architectures Using EclipseLink Database Web Services Developer's Guide</em>.</p>
</div>
<!-- class="sect2" --></div>
<!-- class="sect1" --></div>
<!-- class="ind" -->
<!-- Start Footer -->
<div class="footer">
<hr />
<table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%">
<col width="33%" />
<col width="*" />
<col width="33%" />
<tr>
<td valign="bottom">
<table class="navigation simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100" align="center">
<col width="*" />
<col width="48%" />
<col width="48%" />
<tr>
<td>&nbsp;</td>
<td align="center"><a href="general003.htm"><img src="../../dcommon/images/larrow.png" alt="Previous" border="0" height="16" width="16" /></a></td>
<td align="center"><a href="general005.htm"><img src="../../dcommon/images/rarrow.png" alt="Next" border="0" height="16" width="16" /></a></td>
</tr>
</table>
</td>
<td align="center" width="34%"><a href="http://www.eclipse.org/eclipselink/" title="EclipseLink home"><img src="../../dcommon/images/ellogo.png" alt="EclipseLink" width="150" border="0" /></a><br />
<td valign="bottom" align="right">
<table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="225">
<tr>
<td>&nbsp;</td>
<td align="center" valign="top"><a href="toc.htm"><img src="../../dcommon/images/contents.png" alt="Go To Table Of Contents" border="0" height="16" width="16" /><br />
</td><td>&nbsp;</td><td align="center"><a href="../../" target="_top" class="external text" title="Search" rel="nofollow"><img src="../../dcommon/images/search.png" alt="Search" style="border:0;" /><br /><span class="mini"></span></a></td><td>&nbsp;</td><td align="center"><a href="../eclipselink_otlcg.pdf" title="PDF" target="_blank"><img src="../../dcommon/images/pdf_icon.png" style="padding-right:5px;border:0" alt="PDF"></a></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<!-- class="footer" -->
<div id="copyright">Copyright &copy; 2012 by The Eclipse Foundation under the <a href="http://www.eclipse.org/org/documents/epl-v10.php">Eclipse Public License (EPL)</a><br /> <script type="text/javascript">var LastUpdated = document.lastModified;document.writeln ("Updated: " + LastUpdated);</script> </div><!-- START: Analytics --><script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-1608008-2']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script><!-- END: Analytics --><!-- START: Sharethis --><script>var options={ "publisher": "e2fe9e07-fab6-4f84-83ea-0991b429842c", "position": "right", "ad": { "visible": false, "openDelay": 5, "closeDelay": 0}};var st_hover_widget = new sharethis.widgets.hoverbuttons(options);</script><!-- END: Sharethis --></body>
</html>