blob: b883e1e12e211e5d5136bb5abeb24e13799035c1 [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>New Features | EclipseLink 2.5.x Understanding EclipseLink</title>
<meta name="generator" content="Oracle DARB XHTML Converter (Mode = document) - Version 1.0.17" />
<meta name="date" content="2013-10-03T10:37:14Z" />
<meta name="robots" content="noarchive" />
<meta name="doctitle" content="New Features" />
<meta name="relnum" content="2.5" />
<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="general002.htm" title="Previous" type="text/html" />
<link rel="next" href="general004.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>2.5</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="general002.htm"><img src="../../dcommon/images/larrow.png" alt="Previous" border="0" height="16" width="16" /></a></td>
<td align="center"><a href="general004.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="CHDBIFDB" name="CHDBIFDB"></a>
<div class="sect1"><!-- infolevel="all" infotype="General" -->
<h1 class="sect1"><font face="arial, helvetica, sans-serif" color="#330099">New Features</font></h1>
<p>The following sections provide a brief overview of new features in EclipseLink.</p>
<ul>
<li>
<p><a href="#CHDBIADD">RESTful Services</a></p>
</li>
<li>
<p><a href="#CHDEBFBF">Tenant Isolation</a></p>
</li>
<li>
<p><a href="#CHDFFJJF">NoSQL</a></p>
</li>
<li>
<p><a href="#CHDFCFIC">JSON</a></p>
</li>
<li>
<p><a href="#CHDJAHBA">Database Change Notification</a></p>
</li>
<li>
<p><a href="#CHDJCBBF">Extensible Entities</a></p>
</li>
<li>
<p><a href="#CHDBJIEH">Composite Persistence Units</a></p>
</li>
<li>
<p><a href="#CHDHICEF">External Metadata Sources</a></p>
</li>
<li style="list-style: none"><a id="CHDBIADD" name="CHDBIADD"></a>
<div class="sect2">
<h2 class="sect2"><font face="arial, helvetica, sans-serif" color="#330099">RESTful Services</font></h2>
<p>EclipseLink allows you to expose JPA entities through a standards-based (JAX-RS/JAXB/JPA) RESTful service. REST is an acronym for Representational State Transfer, which is a design idiom that embraces a stateless client-server architecture. In this architecture, Web services are viewed as resources which can be identified by their URIs.</p>
<p>Basic HTTP operations, such as create (POST), read (GET), update (PUT), and delete (DELETE) can be called on the services.</p>
<p>Data in RESTful services are referenced using a URI. A URI can be constructed in different ways, depending on the target, for example:</p>
<ul>
<li>
<p>URI for JPA entities with a single-part primary key</p>
</li>
<li>
<p>URI for JPA entities with composite keys</p>
</li>
<li>
<p>URI with mapped named read queries</p>
</li>
<li>
<p>URI for name update and delete queries</p>
</li>
</ul>
<p>Clients can interact with the RESTful service in any of these ways:</p>
<ul>
<li>
<p>By using a web browser as the client</p>
</li>
<li>
<p>By using Java SE as the client</p>
</li>
<li>
<p>By using implementation-specific APIs</p>
</li>
</ul>
<p>For more information, see "Exposing JPA Entities Through RESTful Services" in <em>Solutions Guide for EclipseLink</em>.</p>
</div>
<!-- class="sect2" -->
<a id="CHDEBFBF" name="CHDEBFBF"></a>
<div class="sect2">
<h2 class="sect2"><font face="arial, helvetica, sans-serif" color="#330099">Tenant Isolation</font></h2>
<p>EclipseLink simplifies the development of application components that offer support for multiple tenants. Developers and deployers have complete control of the application and data isolation they require. Each tenant has access to its own data, while other tenants' data is invisible to it.</p>
<p>EclipseLink provides these options for tenant isolation:</p>
<ul>
<li>
<p>Single-table tenant isolation allows tenants to share tables. Each tenant has its own rows, identified by discriminator columns, and those rows are invisible to other tenants.</p>
</li>
<li>
<p>With table-per-tenant tenant isolation, each tenant has its own table or tables, identified by table tenant discriminators, and those tables are invisible to other users.</p>
</li>
<li>
<p>With Virtual Private Database (VPD) tenant isolation, tenants use a VPD database, which provides the functionality to support multiple tenants sharing the same table.</p>
</li>
</ul>
<p>For more information, see "Using Tenant Isolation" in <em>Solutions Guide for EclipseLink</em>.</p>
</div>
<!-- class="sect2" -->
<a id="CHDFFJJF" name="CHDFFJJF"></a>
<div class="sect2"><!-- infolevel="all" infotype="General" -->
<h2 class="sect2"><font face="arial, helvetica, sans-serif" color="#330099">NoSQL</font></h2>
<p>NoSQL is a classification of database systems that do not support the SQL standard. The NoSQL classification can be expanded to include Enterprise Information Systems (EIS) including application databases, legacy databases, messaging systems, and transaction processing monitors. EclipseLink supports persistence of Java objects to NoSQL databases through the Java Persistence API (JPA). EclipseLink's native API is also supported with NoSQL databases.</p>
<p>NoSQL maps objects to structured data such as XML or JSON. It also supports embedded data, embedded collections, and all of the existing JPA mapping annotations.</p>
<p>Whether querying is supported in NoSQL depends on the NoSQL platform you are using. The JPA transaction API is supported with NoSQL data-sources. Some NoSQL data-sources might not support transactions, so the level of transaction support is dependent on the NoSQL platform.</p>
<p>For more information, see <a href="nosql.htm#BJEIGBFD">Chapter 12, "Understanding Non-relational Data Sources."</a> See also "Using EclipseLink with NoSQL Databases" in <em>Solutions Guide for EclipseLink</em>.</p>
</div>
<!-- class="sect2" -->
<a id="CHDFCFIC" name="CHDFCFIC"></a>
<div class="sect2"><!-- infolevel="all" infotype="General" -->
<h2 class="sect2"><font face="arial, helvetica, sans-serif" color="#330099">JSON</font></h2>
<p>JavaScript Object Notation (JSON) is a text-based open standard designed for human-readable data interchange. It is derived from the JavaScript scripting language for representing simple data structures and associative arrays. It is language-independent, with parsers available for many languages.</p>
<p>JAXB binding metadata is used to marshall Java objects to and from JSON. This feature is useful when creating RESTful services; JAX-RS services can accept both XML and JSON messages.</p>
<p>For more information on JSON support, see "<em>Developing JAXB Applications Using EclipseLink MOXy</em>."</p>
</div>
<!-- class="sect2" -->
<a id="CHDJAHBA" name="CHDJAHBA"></a>
<div class="sect2"><!-- infolevel="all" infotype="General" -->
<h2 class="sect2"><font face="arial, helvetica, sans-serif" color="#330099">Database Change Notification</font></h2>
<p>A shared (L2) object cache reduces database access for objects and their relationships. This cache is enabled by default which is normally not a problem, unless the contents of the database are modified directly by other applications, or by the same application on other servers in a clustered environment. This may result in stale data in the cache.</p>
<p>If the contents of the database are modified, then EclipseLink Database Change Notification (DCN) ensures that the contents of the cache are synchronized with the database. DCN allows shared caching to be used in the JPA environment.</p>
<p>See "Using Caching with a Shared Database in a JPA Environment" in <em>Solutions Guide for EclipseLink</em>.</p>
</div>
<!-- class="sect2" -->
<a id="CHDJCBBF" name="CHDJCBBF"></a>
<div class="sect2"><!-- infolevel="all" infotype="General" -->
<h2 class="sect2"><font face="arial, helvetica, sans-serif" color="#330099">Extensible Entities</font></h2>
<p>Extensible entities allow mappings to be added dynamically. In this case, the entity stores extended attributes within a map instead of static attributes. The entity then defines how values from this map are mapped to the database using an <code>eclipselink-orm.xml</code> mapping file. Extensible entities are useful in a multi-tenant (or SaaS) architecture where a shared, generic application can be used by multiple clients (tenants). Tenants have private access to their own data, and to data shared with other tenants.</p>
<p>Using extensible entities, you can:</p>
<ul>
<li>
<p>Build an application where some mappings are common to all users and some mappings are user-specific.</p>
</li>
<li>
<p>Add mappings to an application after it is made available to a customer (even post-deployment).</p>
</li>
<li>
<p>Use the same <code>EntityManagerFactory</code> interface to work with data after mappings have changed.</p>
</li>
<li>
<p>Provide an additional source of metadata to be used by an application.</p>
</li>
</ul>
<p>For more information on making entities extensible, see "Providing Software as a Service" in <em>Solutions Guide for EclipseLink</em>.</p>
</div>
<!-- class="sect2" -->
<a id="CHDBJIEH" name="CHDBJIEH"></a>
<div class="sect2"><!-- infolevel="all" infotype="General" -->
<h2 class="sect2"><font face="arial, helvetica, sans-serif" color="#330099">Composite Persistence Units</font></h2>
<p>You can expose multiple persistence units (each with unique sets of entity types) as a single persistence context by using a composite persistence unit. Individual persistence units that are part of this composite persistence unit are called composite member persistence units. For more information, see "Using Multiple Databases with a Composite Persistence Unit" in <em>Solutions Guide for EclipseLink</em>.</p>
</div>
<!-- class="sect2" -->
<a id="CHDHICEF" name="CHDHICEF"></a>
<div class="sect2"><!-- infolevel="all" infotype="General" -->
<h2 class="sect2"><font face="arial, helvetica, sans-serif" color="#330099">External Metadata Sources</font></h2>
<p>You can store your mapping information in a metadata source that is external to the running application. Because the mapping information is retrieved when the application creates the persistence unit, you can dynamically override or extend mappings in a deployed application. See "Using an External Metadata Source" in <em>Solutions Guide for EclipseLink</em>.</p>
</div>
<!-- class="sect2" --></li>
</ul>
</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="general002.htm"><img src="../../dcommon/images/larrow.png" alt="Previous" border="0" height="16" width="16" /></a></td>
<td align="center"><a href="general004.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>