You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2017/03/08 00:00:17 UTC

[19/44] isis-site git commit: ISIS-1594: provide an 'edit' button

http://git-wip-us.apache.org/repos/asf/isis-site/blob/83a3755a/content/guides/ugodn.html
----------------------------------------------------------------------
diff --git a/content/guides/ugodn.html b/content/guides/ugodn.html
index 9c34ddd..8016639 100644
--- a/content/guides/ugodn.html
+++ b/content/guides/ugodn.html
@@ -1,12 +1,10 @@
 <!doctype html>
 <html class="no-js" lang="en">
-<head>
-    <meta charset="utf-8"/>
-    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
-
-    <title>DataNucleus Object Store</title>
-
-    <!--
+ <head> 
+  <meta charset="utf-8"> 
+  <meta name="viewport" content="width=device-width, initial-scale=1.0"> 
+  <title>DataNucleus Object Store</title> 
+  <!--
         Licensed to the Apache Software Foundation (ASF) under one
         or more contributor license agreements.  See the NOTICE file
         distributed with this work for additional information
@@ -23,31 +21,21 @@
         KIND, either express or implied.  See the License for the
         specific language governing permissions and limitations
         under the License.
-    -->
-
-    <!-- No caching headers -->
-    <meta http-equiv="cache-control" content="no-cache" />
-    <meta http-equiv="pragma" content="no-cache" />
-    <meta http-equiv="expires" content="-1" />
-
-
-    <!-- TODO: need to (re)instate CDN in the future (not using for now just so can develop off-line -->
-    <link href="../css/foundation/5.5.1/foundation.css" rel="stylesheet" />
-    <script src="../js/foundation/5.5.1/vendor/modernizr.js"></script>
-    <link href="../css/asciidoctor/colony.css" rel="stylesheet">
-    <link href="../css/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
-
-
-
-
-    <link href="../css/github-fork-ribbon-css/0.1.1/gh-fork-ribbon.css" rel="stylesheet" />
-    <!--[if lt IE 9]>
+    --> 
+  <!-- No caching headers --> 
+  <meta http-equiv="cache-control" content="no-cache"> 
+  <meta http-equiv="pragma" content="no-cache"> 
+  <meta http-equiv="expires" content="-1"> 
+  <!-- TODO: need to (re)instate CDN in the future (not using for now just so can develop off-line --> 
+  <link href="../css/foundation/5.5.1/foundation.css" rel="stylesheet"> 
+  <script src="../js/foundation/5.5.1/vendor/modernizr.js"></script> 
+  <link href="../css/asciidoctor/colony.css" rel="stylesheet"> 
+  <link href="../css/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet"> 
+  <link href="../css/github-fork-ribbon-css/0.1.1/gh-fork-ribbon.css" rel="stylesheet"> 
+  <!--[if lt IE 9]>
       <link href="../css/github-fork-ribbon-css/0.1.1/gh-fork-ribbon.ie.css" rel="stylesheet" />
-    <![endif]-->
-
-
-
-    <style type="text/css">
+    <![endif]--> 
+  <style type="text/css">
         pre code {
             background-color: inherit;
             border-style: none;
@@ -192,9 +180,8 @@ table.CodeRay td.code>pre{padding:0}
         color:#fff;
         font-size: 1.1em;
     }
-    </style>
-
-    <style>
+    </style> 
+  <style>
         @media only screen and (min-width: 40.063em) {
           .top-bar {
             .contain-to-grid .top-bar {
@@ -205,9 +192,8 @@ table.CodeRay td.code>pre{padding:0}
         .row {
             max-width: 80rem;
         }
-    </style>
-
-    <style>
+    </style> 
+  <style>
         .extended-quote,
         .extended-quote-first {
             margin-left: 40px;
@@ -231,9 +217,8 @@ table.CodeRay td.code>pre{padding:0}
             text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
         }
         
-    </style>
-
-    <style>
+    </style> 
+  <style>
         body {
           position: relative;
         }
@@ -255,6 +240,7 @@ table.CodeRay td.code>pre{padding:0}
 
         div#doc-content {
             margin-top: 30px;
+            padding-top: 30px;
         }
 
         div.documentation-page table.frame-all {
@@ -286,9 +272,8 @@ table.CodeRay td.code>pre{padding:0}
             min-height: 2000px;
         }
 
-    </style>
-
-    <style>
+    </style> 
+  <style>
 
         @media only screen and (min-width: 768px) {
           #toc.toc2 ul ul { margin-left: -10px; }
@@ -316,15 +301,13 @@ table.CodeRay td.code>pre{padding:0}
         body div#toc2 li.tocify-item.active a {
             color: red;
         }
-    </style>
-
-    <style>
+    </style> 
+  <style>
         footer {
             margin-top: 1000px;
         }
-    </style>
-
-    <style>
+    </style> 
+  <style>
         /* overriding colony.css stylesheet */
         .literalblock pre, .literalblock pre[class], .listingblock pre, .listingblock pre[class] {
            /*padding: 1.25em 1.5625em 1.125em 1.5625em;*/
@@ -372,9 +355,8 @@ table.CodeRay td.code>pre{padding:0}
         .imageblock img {
             margin-bottom: 10px;
         }
-    </style>
-
-    <style>
+    </style> 
+  <style>
         /* from http://ben.balter.com/2014/03/13/pages-anchor-links/ */
         .header-link {
           position: absolute;
@@ -395,9 +377,8 @@ table.CodeRay td.code>pre{padding:0}
         h6:hover .header-link {
           opacity: 1;
         }
-    </style>
-
-    <style>
+    </style> 
+  <style>
         .top-bar
         {
             -webkit-transition-duration: .5s;
@@ -425,740 +406,658 @@ table.CodeRay td.code>pre{padding:0}
             -webkit-transition-property: -webkit-transform;
             transition-property: transform;
         }
-    </style>
-
-    <style>
+    </style> 
+  <style>
         #doc-content a.guide {
             color: white;
         }
-    </style>
-
-    <style>
+    </style> 
+  <style>
+        .tocify {
+            margin-top: 80px;
+        }
+    </style> 
+  <style>
         .tocify {
             margin-top: 80px;
         }
-    </style>
-
-
-</script>
-
-</head>
-<body>
-
-<<div class="github-fork-ribbon-wrapper right" style="position: fixed;">
-    <div class="github-fork-ribbon">
-        <a href="https://github.com/apache/isis#fork-destination-box">Fork me on GitHub</a>
-    </div>
-</div>
-
-
-<div class="row">
-
-    <div class="fixed contain-to-grid header">
-        <nav class="top-bar" data-topbar role="navigation" style="max-width: 80rem">
-            <ul class="title-area">
-                <li class="name">
-                    <h1>
-                        <a href="/index.html">Apache Isis&trade;</a>
-                    </h1>
-                </li>
-                <!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone -->
-                <li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
-            </ul>
-
-            <section class="top-bar-section">
-                <ul class="right">
-
-                    <li class="has-form">
-                       <FORM class="searchbox navbar-form navbar-right" id="searchbox_012614087480249044419:dn-q5gtwxya" action="http://www.google.com/cse">
-                        <div class="row collapse">
-                            <input type="hidden" name="cx" value="012614087480249044419:dn-q5gtwxya">
-                            <INPUT type="hidden" name="cof" value="FORID:0">
-                            <INPUT class="form-control" name="q" type="text" placeholder="Search">
-                        </div>
-                    </FORM>
-                     </li>
-
-                </ul>
-
-                <!-- Left Nav Section -->
-                <ul class="left">
-
-                    <li><a href="/documentation.html">Documentation</a></li>
-                    <li><a href="/downloads.html">Downloads</a></li>
-                    <li><a href="/help.html">Help</a></li>
-                    <li><a href="/asf.html">@ASF</a></li>
-
-                </ul>
-
-            </section>
-        </nav>
-    </div>
-</div>
-
-<div class="row">
-
-    <div id="doc-content-left" class="large-9 medium-9 columns">
-
-
-        <div id="doc-content">
-          <div class="sect1">
-<h2 id="_ugdnos">1. DataNucleus Object Store</h2>
-<div class="sectionbody">
-<div class="paragraph">
-<p>The DataNucleus Object Store enables domain objects to be persisted to relational as well as NoSQL databases.  The object store is implemented using <a href="http://datanuclues.org">DataNucleus</a>.</p>
-</div>
-<div class="paragraph">
-<p>This user guide discuss end-user features, configuration and customization of the DataNucleus object store.</p>
-</div>
-<div class="admonitionblock note">
-<table>
-<tr>
-<td class="icon">
-<i class="fa icon-note" title="Note"></i>
-</td>
-<td class="content">
-<div class="paragraph">
-<p>DataNucleus as a product also supports the JPA API; Apache Isis is likely to also support JPA in the future.</p>
-</div>
-</td>
-</tr>
-</table>
-</div>
-<div class="paragraph">
-<p>Unresolved directive in ugodn.adoc - include::_ugbtb_datanucleus_overriding-jdo-annotations.adoc[leveloffset=+1]
-Unresolved directive in ugodn.adoc - include::_ugbtb_datanucleus_java8.adoc[leveloffset=+1]</p>
-</div>
-<div class="sect2">
-<h3 id="_other_guides">1.1. Other Guides</h3>
-<div class="paragraph">
-<p>Apache Isis documentation is broken out into a number of user and reference guides.</p>
-</div>
-<div class="paragraph">
-<p>The user guides available are:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p><a href="ugfun.html">Fundamentals</a></p>
-</li>
-<li>
-<p><a href="ugvw.html">Wicket viewer</a></p>
-</li>
-<li>
-<p><a href="ugvro.html">Restful Objects viewer</a></p>
-</li>
-<li>
-<p><a href="ugdno.html">DataNucleus object store</a> (this guide)</p>
-</li>
-<li>
-<p><a href="ugsec.html">Security</a></p>
-</li>
-<li>
-<p><a href="ugtst.html">Testing</a></p>
-</li>
-<li>
-<p><a href="ugbtb.html">Beyond the Basics</a></p>
-</li>
-</ul>
-</div>
-<div class="paragraph">
-<p>The reference guides are:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p><a href="rgant.html">Annotations</a></p>
-</li>
-<li>
-<p><a href="rgsvc.html">Domain Services</a></p>
-</li>
-<li>
-<p><a href="rgcfg.html">Configuration Properties</a></p>
-</li>
-<li>
-<p><a href="rgcms.html">Classes, Methods and Schema</a></p>
-</li>
-<li>
-<p><a href="rgmvn.html">Apache Isis Maven plugin</a></p>
-</li>
-<li>
-<p><a href="rgfis.html">Framework Internal Services</a></p>
-</li>
-</ul>
-</div>
-<div class="paragraph">
-<p>The remaining guides are:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p><a href="dg.html">Developers' Guide</a> (how to set up a development environment
-for Apache Isis and contribute back to the project)</p>
-</li>
-<li>
-<p><a href="cgcom.html">Committers' Guide</a> (release procedures and related practices)</p>
-</li>
-</ul>
-</div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_ugodn_configuring">2. Configuring DataNucleus</h2>
-<div class="sectionbody">
-<div class="paragraph">
-<p>Apache Isis programmatically configures DataNucleus; any Apache Isis properties with the prefix <code>isis.persistor.datanucleus.impl</code> are passed through directly to the JDO/DataNucleus objectstore (with the prefix stripped off, of course).</p>
-</div>
-<div class="paragraph">
-<p>DataNucleus will for itself also and read the <code>META-INF/persistence.xml</code>; at a minimum this defines the name of the "persistence unit".  n theory it could also hold mappings, though in Apache Isis we tend to use annotations instead.</p>
-</div>
-<div class="paragraph">
-<p>Furthermore, DataNucleus will search for various other XML mapping files, eg <code>mappings.jdo</code>.  A full list can be found <a href="http://www.datanucleus.org/products/datanucleus/jdo/metadata.html">here</a>.  The metadata in these XML can be used to override the annotations of annotated entities; see <a href="ugbtb.html#_ugbtb_other-techniques_overriding-jdo-annotations">Overriding JDO Annotatons</a> for further discussion.</p>
-</div>
-<div class="sect2">
-<h3 id="_ugodn_configuring_properties">2.1. Configuration Properties</h3>
-<div class="paragraph">
-<p>These configuration properties are typically stored in <code>WEB-INF/persistor_datanucleus.properties</code>.  However, you can place all configuration properties into <code>WEB-INF/isis.properties</code> if you wish (the configuration properties from all config files are merged together).</p>
-</div>
-<div class="sect3">
-<h4 id="_configuration_properties_for_apache_isis_itself">2.1.1. Configuration Properties for Apache Isis itself</h4>
-<table class="tableblock frame-all grid-all spread">
-<caption class="title">Table 1. JDO/DataNucleus Objectstore Configuration Properties</caption>
-<colgroup>
-<col style="width: 33.3333%;">
-<col style="width: 16.6666%;">
-<col style="width: 50.0001%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top">Property</th>
-<th class="tableblock halign-left valign-top">Value<br>
-(<em>default value</em>)</th>
-<th class="tableblock halign-left valign-top">Description</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
-<p><code>isis.persistor.</code><br>
-<code>datanucleus.</code><br>
-<code>classMetadataLoadedListener</code></p>
-</div></div></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><code>FQCN</code></p></td>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
-<p>The default (<code>o.a.i.os.jdo.dn.CreateSchemaObjectFromClassMetadata</code>) creates a DB schema object</p>
-</div></div></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
-<p><code>isis.persistor.datanucleus.</code><br>
-<code>RegisterEntities.packagePrefix</code></p>
-</div></div></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">fully qualified package names (CSV)</p></td>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
-<p>that specifies the entities early rather than allow DataNucleus to find the entities lazily.  Further <a href="#_ugodn_configuring_eagerly-registering-entities">discussion below</a>.</p>
-</div>
-<div class="paragraph">
-<p>This property is IGNORED if the <a href="rgcfg.html#_rgcfg_configuring-components"><code>isis.appManifest</code></a> configuration property is specified, or if an <a href="rgcms.html#_rgcms_classes_super_AppManifest"><code>AppManifest</code></a> is provided programmatically.</p>
-</div></div></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
-<p><code>isis.persistor.datanucleus.</code><br>
-<code>PublishingService.serializedForm</code></p>
-</div></div></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock">zipped</p></td>
-<td class="tableblock halign-left valign-top"><div></div></td>
-</tr>
-</tbody>
-</table>
-</div>
-<div class="sect3">
-<h4 id="_configuration_properties_passed_through_directly_to_datanucleus">2.1.2. Configuration Properties passed through directly to DataNucleus.</h4>
-<table class="tableblock frame-all grid-all spread">
-<caption class="title">Table 2. JDO/DataNucleus Objectstore Configuration Properties</caption>
-<colgroup>
-<col style="width: 33.3333%;">
-<col style="width: 16.6666%;">
-<col style="width: 50.0001%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-top">Property</th>
-<th class="tableblock halign-left valign-top">Value<br>
-(<em>default value</em>)</th>
-<th class="tableblock halign-left valign-top">Description</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
-<p><code>isis.persistor.datanucleus.impl.*</code></p>
-</div></div></td>
-<td class="tableblock halign-left valign-top"></td>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
-<p>Passed through directly to Datanucleus (with <code>isis.persistor.datanucleus.impl</code> prefix stripped)</p>
-</div></div></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
-<p><code>isis.persistor.datanucleus.impl.</code><br>
-<code>datanucleus.persistenceByReachabilityAtCommit</code></p>
-</div></div></td>
-<td class="tableblock halign-left valign-top"><p class="tableblock"><code>false</code></p></td>
-<td class="tableblock halign-left valign-top"><div><div class="paragraph">
-<p>We recommend this setting is disabled. <br>
-Further <a href="#_ugodn_configuring_disabling-persistence-by-reachability">discussion below</a>.</p>
-</div></div></td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
-<div class="sect2">
-<h3 id="_ugodn_configuring_persistence-xml">2.2. <code>persistence.xml</code></h3>
-<div class="admonitionblock note">
-<table>
-<tr>
-<td class="icon">
-<i class="fa icon-note" title="Note"></i>
-</td>
-<td class="content">
-TODO
-</td>
-</tr>
-</table>
-</div>
-</div>
-<div class="sect2">
-<h3 id="_ugodn_configuring_eagerly-registering-entities">2.3. Eagerly Registering Entities</h3>
-<div class="paragraph">
-<p>Both Apache Isis and DataNucleus have their own metamodels of the domain entities. Apache Isis builds its metamodel by walking the graph of types of the domain services.  The JDO/DataNucleus objectstore then takes these types and registers them with DataNucleus.</p>
-</div>
-<div class="paragraph">
-<p>In some cases, though, not every entity type is discoverable from the API of the service actions. This is especially the case if you have lots of subtypes (where the action method specifies only the supertype). In such cases the Isis and JDO metamodels is built lazily, when an instance of that (sub)type is first encountered.</p>
-</div>
-<div class="paragraph">
-<p>Apache Isis is quite happy for the metamodel to be lazily created, and - to be fair - DataNucleus also works well in most cases. In some cases, though, we have found that the JDBC driver (eg HSQLDB) will deadlock if DataNucleus tries to submit some DDL (for a lazily discovered type) intermingled with DML (for updating).  In any case, it&#8217;s probably not good practice to have DataNucleus work this way.</p>
-</div>
-<div class="paragraph">
-<p>The framework thus provide mechanisms to search for all <code>@PersistenceCapable</code> entities under specified package(s), and registers them all eagerly.  In fact there are two:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p>as of 1.9.0 the recommended (and simpler) approach is to specify an <a href="rgcms.html#_rgcms_classes_super_AppManifest"><code>AppManifest</code></a>, either as a <a href="rgcfg.html#_rgcfg_configuring-components"><code>isis.appManifest</code></a> configuration property or programmatically.</p>
-</li>
-<li>
-<p>for earlier versions the <code>isis.persistor.datanucleus.RegisterEntities.packagePrefix</code> configuration property can be specified.  To bootstrap as a webapp this is usually specified in <code>persistor_datanucleus.properties</code>.  (This is also supported in 1.9.0 if no <code>AppManifest</code> is specified.  For integration testing this can be specified programatically.</p>
-</li>
-</ul>
-</div>
-<div class="paragraph">
-<p>Further discussion on specifying the package(s) in integration testing (for either approach) can be found in the <a href="ugtst.html#_ugtst_integ-test-support_bootstrapping">user guide</a>.</p>
-</div>
-</div>
-<div class="sect2">
-<h3 id="_ugodn_configuring_disabling-persistence-by-reachability">2.4. Persistence by Reachability</h3>
-<div class="paragraph">
-<p>By default, JDO/DataNucleus supports the concept of <a href="http://www.datanucleus.org/products/datanucleus/jdo/orm/cascading.html">persistence-by-reachability</a>. That is, if
-a non-persistent entity is associated with an already-persistent entity, then DataNucleus will detect this and will automatically persist the associated object. Put another way: there is no need to call Apache Isis' <code>DomainObjectContainer#persist(.)</code> or <code>DomainObjectContainer#persistIfNotAlready(.)</code> methods.</p>
-</div>
-<div class="paragraph">
-<p>However, convenient though this feature is, you may find that it causes performance issues.</p>
-</div>
-<div class="admonitionblock warning">
-<table>
-<tr>
-<td class="icon">
-<i class="fa icon-warning" title="Warning"></i>
-</td>
-<td class="content">
-<div class="paragraph">
-<p>DataNucleus' persistence-by-reachability may cause performance issues.  We strongly recommend that you disable it.</p>
-</div>
-</td>
-</tr>
-</table>
-</div>
-<div class="paragraph">
-<p>One scenario in particular where this performance issues can arise is if your entities implement the <code>java.lang.Comparable</code> interface, and you have used Apache Isis' <a href="rgcms.html#_rgcms_classes_utility_ObjectContracts"><code>ObjectContracts</code></a> utility class. The issue here is that <code>ObjectContracts</code> implementation can cause DataNucleus to recursively rehydrate a larger number of associated entities. (More detail below).</p>
-</div>
-<div class="paragraph">
-<p>We therefore recommend that you disable persistence-by-reachability by adding the following to <code>persistor_datanucleus.properties</code>:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code data-lang="ini">isis.persistor.datanucleus.impl.datanucleus.persistenceByReachabilityAtCommit=false</code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p>This change has been made to the <a href="ugfun.html#_ugfun_getting-started_simpleapp-archetype">SimpleApp archetype</a></p>
-</div>
-<div class="paragraph">
-<p>If you do disable this feature, then you will (of course) need to ensure that you explicitly persist all entities using the <code>DomainObjectContainer#persist(.)</code> or <code>DomainObjectContainer#persistIfNotAlready(.)</code> methods.</p>
-</div>
-<div class="sect3">
-<h4 id="_the_issue_in_more_detail">2.4.1. The issue in more detail</h4>
-<div class="paragraph">
-<p>Consider these entities (<a href="http://yuml.me/edit/b8681268">yuml.me/b8681268</a>):</p>
-</div>
-<div class="imageblock">
-<div class="content">
-<img src="images/runtime/configuring-datanucleus/disabling-persistence-by-reachability/party-agreementrole-agreement.png" alt="party agreementrole agreement" width="750px">
-</div>
-</div>
-<div class="paragraph">
-<p>In the course of a transaction, the <code>Agreement</code> entity is loaded into memory (not necessarily modified), and then new <code>AgreementRole</code>s are associated to it.</p>
-</div>
-<div class="paragraph">
-<p>All these entities implement <code>Comparable</code> using <code>ObjectContracts</code>, and the implementation of <code>AgreementRole</code>'s (simplified) is:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code data-lang="java"><span class="directive">public</span> <span class="type">class</span> <span class="class">AgreementRole</span> {
+    </style>  
+ </head> 
+ <body> 
+  <div class="row"> 
+   <div class="fixed contain-to-grid header"> 
+    <nav class="top-bar" data-topbar role="navigation" style="max-width: 80rem"> 
+     <ul class="title-area"> 
+      <li class="name"> <h1> <a href="/index.html">Apache Isis\u2122</a> </h1> </li> 
+      <!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone --> 
+      <li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li> 
+     </ul> 
+     <section class="top-bar-section"> 
+      <ul class="right"> 
+       <li class="has-form"> 
+        <form class="searchbox navbar-form navbar-right" id="searchbox_012614087480249044419:dn-q5gtwxya" action="http://www.google.com/cse"> 
+         <div class="row collapse"> 
+          <input type="hidden" name="cx" value="012614087480249044419:dn-q5gtwxya"> 
+          <input type="hidden" name="cof" value="FORID:0"> 
+          <input class="form-control" name="q" type="text" placeholder="Search"> 
+         </div> 
+        </form> </li> 
+      </ul> 
+      <!-- Left Nav Section --> 
+      <ul class="left"> 
+       <li><a href="/documentation.html">Documentation</a></li> 
+       <li><a href="/downloads.html">Downloads</a></li> 
+       <li><a href="/help.html">Help</a></li> 
+       <li><a href="/asf.html">@ASF</a></li> 
+      </ul> 
+     </section> 
+    </nav> 
+   </div> 
+  </div> 
+  <div class="row"> 
+   <div id="doc-content-left" class="large-9 medium-9 columns"> 
+    <div id="doc-content">
+     <button type="button" class="button secondary" onclick="window.location.href=&quot;https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/ugodn.adoc&quot;" style="float: right; font-size: small; padding: 6px;  "><i class="fa fa-pencil-square-o"></i>&nbsp;Edit</button> 
+     <div class="sect1"> 
+      <h2 id="_ugdnos">1. DataNucleus Object Store</h2>
+      <button type="button" class="button secondary" onclick="window.location.href=&quot;https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/_ugdnos.adoc&quot;" style="float: right; font-size: small; padding: 6px; margin-top: -55px; "><i class="fa fa-pencil-square-o"></i>&nbsp;Edit</button> 
+      <div class="sectionbody"> 
+       <div class="paragraph"> 
+        <p>The DataNucleus Object Store enables domain objects to be persisted to relational as well as NoSQL databases. The object store is implemented using <a href="http://datanuclues.org">DataNucleus</a>.</p> 
+       </div> 
+       <div class="paragraph"> 
+        <p>This user guide discuss end-user features, configuration and customization of the DataNucleus object store.</p> 
+       </div> 
+       <div class="admonitionblock note"> 
+        <table> 
+         <tbody>
+          <tr> 
+           <td class="icon"> <i class="fa icon-note" title="Note"></i> </td> 
+           <td class="content"> 
+            <div class="paragraph"> 
+             <p>DataNucleus as a product also supports the JPA API; Apache Isis is likely to also support JPA in the future.</p> 
+            </div> </td> 
+          </tr> 
+         </tbody>
+        </table> 
+       </div> 
+       <div class="paragraph"> 
+        <p>Unresolved directive in ugodn.adoc - include::_ugbtb_datanucleus_overriding-jdo-annotations.adoc[leveloffset=+1] Unresolved directive in ugodn.adoc - include::_ugbtb_datanucleus_java8.adoc[leveloffset=+1]</p> 
+       </div> 
+       <div class="sect2"> 
+        <h3 id="_other_guides">1.1. Other Guides</h3> 
+        <div class="paragraph"> 
+         <p>Apache Isis documentation is broken out into a number of user and reference guides.</p> 
+        </div> 
+        <div class="paragraph"> 
+         <p>The user guides available are:</p> 
+        </div> 
+        <div class="ulist"> 
+         <ul> 
+          <li> <p><a href="ugfun.html">Fundamentals</a></p> </li> 
+          <li> <p><a href="ugvw.html">Wicket viewer</a></p> </li> 
+          <li> <p><a href="ugvro.html">Restful Objects viewer</a></p> </li> 
+          <li> <p><a href="ugdno.html">DataNucleus object store</a> (this guide)</p> </li> 
+          <li> <p><a href="ugsec.html">Security</a></p> </li> 
+          <li> <p><a href="ugtst.html">Testing</a></p> </li> 
+          <li> <p><a href="ugbtb.html">Beyond the Basics</a></p> </li> 
+         </ul> 
+        </div> 
+        <div class="paragraph"> 
+         <p>The reference guides are:</p> 
+        </div> 
+        <div class="ulist"> 
+         <ul> 
+          <li> <p><a href="rgant.html">Annotations</a></p> </li> 
+          <li> <p><a href="rgsvc.html">Domain Services</a></p> </li> 
+          <li> <p><a href="rgcfg.html">Configuration Properties</a></p> </li> 
+          <li> <p><a href="rgcms.html">Classes, Methods and Schema</a></p> </li> 
+          <li> <p><a href="rgmvn.html">Apache Isis Maven plugin</a></p> </li> 
+          <li> <p><a href="rgfis.html">Framework Internal Services</a></p> </li> 
+         </ul> 
+        </div> 
+        <div class="paragraph"> 
+         <p>The remaining guides are:</p> 
+        </div> 
+        <div class="ulist"> 
+         <ul> 
+          <li> <p><a href="dg.html">Developers' Guide</a> (how to set up a development environment for Apache Isis and contribute back to the project)</p> </li> 
+          <li> <p><a href="cgcom.html">Committers' Guide</a> (release procedures and related practices)</p> </li> 
+         </ul> 
+        </div> 
+       </div> 
+      </div> 
+     </div> 
+     <div class="sect1"> 
+      <h2 id="_ugodn_configuring">2. Configuring DataNucleus</h2>
+      <button type="button" class="button secondary" onclick="window.location.href=&quot;https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/_ugodn_configuring.adoc&quot;" style="float: right; font-size: small; padding: 6px; margin-top: -55px; "><i class="fa fa-pencil-square-o"></i>&nbsp;Edit</button> 
+      <div class="sectionbody"> 
+       <div class="paragraph"> 
+        <p>Apache Isis programmatically configures DataNucleus; any Apache Isis properties with the prefix <code>isis.persistor.datanucleus.impl</code> are passed through directly to the JDO/DataNucleus objectstore (with the prefix stripped off, of course).</p> 
+       </div> 
+       <div class="paragraph"> 
+        <p>DataNucleus will for itself also and read the <code>META-INF/persistence.xml</code>; at a minimum this defines the name of the "persistence unit". n theory it could also hold mappings, though in Apache Isis we tend to use annotations instead.</p> 
+       </div> 
+       <div class="paragraph"> 
+        <p>Furthermore, DataNucleus will search for various other XML mapping files, eg <code>mappings.jdo</code>. A full list can be found <a href="http://www.datanucleus.org/products/datanucleus/jdo/metadata.html">here</a>. The metadata in these XML can be used to override the annotations of annotated entities; see <a href="ugbtb.html#_ugbtb_other-techniques_overriding-jdo-annotations">Overriding JDO Annotatons</a> for further discussion.</p> 
+       </div> 
+       <div class="sect2"> 
+        <h3 id="_ugodn_configuring_properties">2.1. Configuration Properties</h3> 
+        <div class="paragraph"> 
+         <p>These configuration properties are typically stored in <code>WEB-INF/persistor_datanucleus.properties</code>. However, you can place all configuration properties into <code>WEB-INF/isis.properties</code> if you wish (the configuration properties from all config files are merged together).</p> 
+        </div> 
+        <div class="sect3"> 
+         <h4 id="_configuration_properties_for_apache_isis_itself">2.1.1. Configuration Properties for Apache Isis itself</h4> 
+         <table class="tableblock frame-all grid-all spread"> 
+          <caption class="title">
+           Table 1. JDO/DataNucleus Objectstore Configuration Properties
+          </caption> 
+          <colgroup> 
+           <col style="width: 33.3333%;"> 
+           <col style="width: 16.6666%;"> 
+           <col style="width: 50.0001%;"> 
+          </colgroup> 
+          <thead> 
+           <tr> 
+            <th class="tableblock halign-left valign-top">Property</th> 
+            <th class="tableblock halign-left valign-top">Value<br> (<em>default value</em>)</th> 
+            <th class="tableblock halign-left valign-top">Description</th> 
+           </tr> 
+          </thead> 
+          <tbody> 
+           <tr> 
+            <td class="tableblock halign-left valign-top">
+             <div>
+              <div class="paragraph"> 
+               <p><code>isis.persistor.</code><br> <code>datanucleus.</code><br> <code>classMetadataLoadedListener</code></p> 
+              </div>
+             </div></td> 
+            <td class="tableblock halign-left valign-top"><p class="tableblock"><code>FQCN</code></p></td> 
+            <td class="tableblock halign-left valign-top">
+             <div>
+              <div class="paragraph"> 
+               <p>The default (<code>o.a.i.os.jdo.dn.CreateSchemaObjectFromClassMetadata</code>) creates a DB schema object</p> 
+              </div>
+             </div></td> 
+           </tr> 
+           <tr> 
+            <td class="tableblock halign-left valign-top">
+             <div>
+              <div class="paragraph"> 
+               <p><code>isis.persistor.datanucleus.</code><br> <code>RegisterEntities.packagePrefix</code></p> 
+              </div>
+             </div></td> 
+            <td class="tableblock halign-left valign-top"><p class="tableblock">fully qualified package names (CSV)</p></td> 
+            <td class="tableblock halign-left valign-top">
+             <div>
+              <div class="paragraph"> 
+               <p>that specifies the entities early rather than allow DataNucleus to find the entities lazily. Further <a href="#_ugodn_configuring_eagerly-registering-entities">discussion below</a>.</p> 
+              </div> 
+              <div class="paragraph"> 
+               <p>This property is IGNORED if the <a href="rgcfg.html#_rgcfg_configuring-components"><code>isis.appManifest</code></a> configuration property is specified, or if an <a href="rgcms.html#_rgcms_classes_super_AppManifest"><code>AppManifest</code></a> is provided programmatically.</p> 
+              </div>
+             </div></td> 
+           </tr> 
+           <tr> 
+            <td class="tableblock halign-left valign-top">
+             <div>
+              <div class="paragraph"> 
+               <p><code>isis.persistor.datanucleus.</code><br> <code>PublishingService.serializedForm</code></p> 
+              </div>
+             </div></td> 
+            <td class="tableblock halign-left valign-top"><p class="tableblock">zipped</p></td> 
+            <td class="tableblock halign-left valign-top">
+             <div></div></td> 
+           </tr> 
+          </tbody> 
+         </table> 
+        </div> 
+        <div class="sect3"> 
+         <h4 id="_configuration_properties_passed_through_directly_to_datanucleus">2.1.2. Configuration Properties passed through directly to DataNucleus.</h4> 
+         <table class="tableblock frame-all grid-all spread"> 
+          <caption class="title">
+           Table 2. JDO/DataNucleus Objectstore Configuration Properties
+          </caption> 
+          <colgroup> 
+           <col style="width: 33.3333%;"> 
+           <col style="width: 16.6666%;"> 
+           <col style="width: 50.0001%;"> 
+          </colgroup> 
+          <thead> 
+           <tr> 
+            <th class="tableblock halign-left valign-top">Property</th> 
+            <th class="tableblock halign-left valign-top">Value<br> (<em>default value</em>)</th> 
+            <th class="tableblock halign-left valign-top">Description</th> 
+           </tr> 
+          </thead> 
+          <tbody> 
+           <tr> 
+            <td class="tableblock halign-left valign-top">
+             <div>
+              <div class="paragraph"> 
+               <p><code>isis.persistor.datanucleus.impl.*</code></p> 
+              </div>
+             </div></td> 
+            <td class="tableblock halign-left valign-top"></td> 
+            <td class="tableblock halign-left valign-top">
+             <div>
+              <div class="paragraph"> 
+               <p>Passed through directly to Datanucleus (with <code>isis.persistor.datanucleus.impl</code> prefix stripped)</p> 
+              </div>
+             </div></td> 
+           </tr> 
+           <tr> 
+            <td class="tableblock halign-left valign-top">
+             <div>
+              <div class="paragraph"> 
+               <p><code>isis.persistor.datanucleus.impl.</code><br> <code>datanucleus.persistenceByReachabilityAtCommit</code></p> 
+              </div>
+             </div></td> 
+            <td class="tableblock halign-left valign-top"><p class="tableblock"><code>false</code></p></td> 
+            <td class="tableblock halign-left valign-top">
+             <div>
+              <div class="paragraph"> 
+               <p>We recommend this setting is disabled. <br> Further <a href="#_ugodn_configuring_disabling-persistence-by-reachability">discussion below</a>.</p> 
+              </div>
+             </div></td> 
+           </tr> 
+          </tbody> 
+         </table> 
+        </div> 
+       </div> 
+       <div class="sect2"> 
+        <h3 id="_ugodn_configuring_persistence-xml">2.2. <code>persistence.xml</code></h3> 
+        <div class="admonitionblock note"> 
+         <table> 
+          <tbody>
+           <tr> 
+            <td class="icon"> <i class="fa icon-note" title="Note"></i> </td> 
+            <td class="content"> TODO </td> 
+           </tr> 
+          </tbody>
+         </table> 
+        </div> 
+       </div> 
+       <div class="sect2"> 
+        <h3 id="_ugodn_configuring_eagerly-registering-entities">2.3. Eagerly Registering Entities</h3> 
+        <div class="paragraph"> 
+         <p>Both Apache Isis and DataNucleus have their own metamodels of the domain entities. Apache Isis builds its metamodel by walking the graph of types of the domain services. The JDO/DataNucleus objectstore then takes these types and registers them with DataNucleus.</p> 
+        </div> 
+        <div class="paragraph"> 
+         <p>In some cases, though, not every entity type is discoverable from the API of the service actions. This is especially the case if you have lots of subtypes (where the action method specifies only the supertype). In such cases the Isis and JDO metamodels is built lazily, when an instance of that (sub)type is first encountered.</p> 
+        </div> 
+        <div class="paragraph"> 
+         <p>Apache Isis is quite happy for the metamodel to be lazily created, and - to be fair - DataNucleus also works well in most cases. In some cases, though, we have found that the JDBC driver (eg HSQLDB) will deadlock if DataNucleus tries to submit some DDL (for a lazily discovered type) intermingled with DML (for updating). In any case, it\u2019s probably not good practice to have DataNucleus work this way.</p> 
+        </div> 
+        <div class="paragraph"> 
+         <p>The framework thus provide mechanisms to search for all <code>@PersistenceCapable</code> entities under specified package(s), and registers them all eagerly. In fact there are two:</p> 
+        </div> 
+        <div class="ulist"> 
+         <ul> 
+          <li> <p>as of 1.9.0 the recommended (and simpler) approach is to specify an <a href="rgcms.html#_rgcms_classes_super_AppManifest"><code>AppManifest</code></a>, either as a <a href="rgcfg.html#_rgcfg_configuring-components"><code>isis.appManifest</code></a> configuration property or programmatically.</p> </li> 
+          <li> <p>for earlier versions the <code>isis.persistor.datanucleus.RegisterEntities.packagePrefix</code> configuration property can be specified. To bootstrap as a webapp this is usually specified in <code>persistor_datanucleus.properties</code>. (This is also supported in 1.9.0 if no <code>AppManifest</code> is specified. For integration testing this can be specified programatically.</p> </li> 
+         </ul> 
+        </div> 
+        <div class="paragraph"> 
+         <p>Further discussion on specifying the package(s) in integration testing (for either approach) can be found in the <a href="ugtst.html#_ugtst_integ-test-support_bootstrapping">user guide</a>.</p> 
+        </div> 
+       </div> 
+       <div class="sect2"> 
+        <h3 id="_ugodn_configuring_disabling-persistence-by-reachability">2.4. Persistence by Reachability</h3> 
+        <div class="paragraph"> 
+         <p>By default, JDO/DataNucleus supports the concept of <a href="http://www.datanucleus.org/products/datanucleus/jdo/orm/cascading.html">persistence-by-reachability</a>. That is, if a non-persistent entity is associated with an already-persistent entity, then DataNucleus will detect this and will automatically persist the associated object. Put another way: there is no need to call Apache Isis' <code>DomainObjectContainer#persist(.)</code> or <code>DomainObjectContainer#persistIfNotAlready(.)</code> methods.</p> 
+        </div> 
+        <div class="paragraph"> 
+         <p>However, convenient though this feature is, you may find that it causes performance issues.</p> 
+        </div> 
+        <div class="admonitionblock warning"> 
+         <table> 
+          <tbody>
+           <tr> 
+            <td class="icon"> <i class="fa icon-warning" title="Warning"></i> </td> 
+            <td class="content"> 
+             <div class="paragraph"> 
+              <p>DataNucleus' persistence-by-reachability may cause performance issues. We strongly recommend that you disable it.</p> 
+             </div> </td> 
+           </tr> 
+          </tbody>
+         </table> 
+        </div> 
+        <div class="paragraph"> 
+         <p>One scenario in particular where this performance issues can arise is if your entities implement the <code>java.lang.Comparable</code> interface, and you have used Apache Isis' <a href="rgcms.html#_rgcms_classes_utility_ObjectContracts"><code>ObjectContracts</code></a> utility class. The issue here is that <code>ObjectContracts</code> implementation can cause DataNucleus to recursively rehydrate a larger number of associated entities. (More detail below).</p> 
+        </div> 
+        <div class="paragraph"> 
+         <p>We therefore recommend that you disable persistence-by-reachability by adding the following to <code>persistor_datanucleus.properties</code>:</p> 
+        </div> 
+        <div class="listingblock"> 
+         <div class="content"> 
+          <pre class="CodeRay highlight"><code data-lang="ini">isis.persistor.datanucleus.impl.datanucleus.persistenceByReachabilityAtCommit=false</code></pre> 
+         </div> 
+        </div> 
+        <div class="paragraph"> 
+         <p>This change has been made to the <a href="ugfun.html#_ugfun_getting-started_simpleapp-archetype">SimpleApp archetype</a></p> 
+        </div> 
+        <div class="paragraph"> 
+         <p>If you do disable this feature, then you will (of course) need to ensure that you explicitly persist all entities using the <code>DomainObjectContainer#persist(.)</code> or <code>DomainObjectContainer#persistIfNotAlready(.)</code> methods.</p> 
+        </div> 
+        <div class="sect3"> 
+         <h4 id="_the_issue_in_more_detail">2.4.1. The issue in more detail</h4> 
+         <div class="paragraph"> 
+          <p>Consider these entities (<a href="http://yuml.me/edit/b8681268">yuml.me/b8681268</a>):</p> 
+         </div> 
+         <div class="imageblock"> 
+          <div class="content"> 
+           <img src="images/runtime/configuring-datanucleus/disabling-persistence-by-reachability/party-agreementrole-agreement.png" alt="party agreementrole agreement" width="750px"> 
+          </div> 
+         </div> 
+         <div class="paragraph"> 
+          <p>In the course of a transaction, the <code>Agreement</code> entity is loaded into memory (not necessarily modified), and then new <code>AgreementRole</code>s are associated to it.</p> 
+         </div> 
+         <div class="paragraph"> 
+          <p>All these entities implement <code>Comparable</code> using <code>ObjectContracts</code>, and the implementation of <code>AgreementRole</code>'s (simplified) is:</p> 
+         </div> 
+         <div class="listingblock"> 
+          <div class="content"> 
+           <pre class="CodeRay highlight"><code data-lang="java"><span class="directive">public</span> <span class="type">class</span> <span class="class">AgreementRole</span> {
     ...
     public <span class="type">int</span> compareTo(AgreementRole other) {
-        <span class="keyword">return</span> ObjectContracts.compareTo(<span class="local-variable">this</span>, other, <span class="string"><span class="delimiter">&quot;</span><span class="content">agreement</span><span class="delimiter">&quot;</span></span>,<span class="string"><span class="delimiter">&quot;</span><span class="content">startDate</span><span class="delimiter">&quot;</span></span>,<span class="string"><span class="delimiter">&quot;</span><span class="content">party</span><span class="delimiter">&quot;</span></span>);
+        <span class="keyword">return</span> ObjectContracts.compareTo(<span class="local-variable">this</span>, other, <span class="string"><span class="delimiter">"</span><span class="content">agreement</span><span class="delimiter">"</span></span>,<span class="string"><span class="delimiter">"</span><span class="content">startDate</span><span class="delimiter">"</span></span>,<span class="string"><span class="delimiter">"</span><span class="content">party</span><span class="delimiter">"</span></span>);
     }
-}</code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p>while <code>Agreement</code>'s is implemented as:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code data-lang="java"><span class="directive">public</span> <span class="type">class</span> <span class="class">Agreement</span> {
+}</code></pre> 
+          </div> 
+         </div> 
+         <div class="paragraph"> 
+          <p>while <code>Agreement</code>'s is implemented as:</p> 
+         </div> 
+         <div class="listingblock"> 
+          <div class="content"> 
+           <pre class="CodeRay highlight"><code data-lang="java"><span class="directive">public</span> <span class="type">class</span> <span class="class">Agreement</span> {
     ...
     public <span class="type">int</span> compareTo(Agreement other) {
-        <span class="keyword">return</span> ObjectContracts.compareTo(<span class="local-variable">this</span>, other, <span class="string"><span class="delimiter">&quot;</span><span class="content">reference</span><span class="delimiter">&quot;</span></span>);
+        <span class="keyword">return</span> ObjectContracts.compareTo(<span class="local-variable">this</span>, other, <span class="string"><span class="delimiter">"</span><span class="content">reference</span><span class="delimiter">"</span></span>);
     }
-}</code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p>and <code>Party</code>'s is similarly implemented as:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code data-lang="java"><span class="directive">public</span> <span class="type">class</span> <span class="class">Party</span> {
+}</code></pre> 
+          </div> 
+         </div> 
+         <div class="paragraph"> 
+          <p>and <code>Party</code>'s is similarly implemented as:</p> 
+         </div> 
+         <div class="listingblock"> 
+          <div class="content"> 
+           <pre class="CodeRay highlight"><code data-lang="java"><span class="directive">public</span> <span class="type">class</span> <span class="class">Party</span> {
     ...
     public <span class="type">int</span> compareTo(Party other) {
-        <span class="keyword">return</span> ObjectContracts.compareTo(<span class="local-variable">this</span>, other, <span class="string"><span class="delimiter">&quot;</span><span class="content">reference</span><span class="delimiter">&quot;</span></span>);
+        <span class="keyword">return</span> ObjectContracts.compareTo(<span class="local-variable">this</span>, other, <span class="string"><span class="delimiter">"</span><span class="content">reference</span><span class="delimiter">"</span></span>);
     }
-}</code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p>DataNucleus&#8217;s persistence-by-reachability algorithm adds the <code>AgreementRole</code> instances into a <code>SortedSet</code>, which causes <code>AgreementRole#compareTo()</code> to fire:</p>
-</div>
-<div class="ulist">
-<ul>
-<li>
-<p>the evaluation of the "agreement" property delegates back to the <code>Agreement</code>, whose own <code>Agreement#compareTo()</code> uses the scalar <code>reference</code> property. As the <code>Agreement</code> is already in-memory, this does not trigger any further database queries</p>
-</li>
-<li>
-<p>the evaluation of the "startDate" property is just a scalar property of the <code>AgreementRole</code>, so will already in-memory</p>
-</li>
-<li>
-<p>the evaluation of the "party" property delegates back to the <code>Party</code>, whose own <code>Party#compareTo()</code> requires the uses the scalar <code>reference</code> property. However, since the <code>Party</code> is not yet in-memory, using the <code>reference</code> property triggers a database query to "rehydrate" the <code>Party</code> instance.</p>
-</li>
-</ul>
-</div>
-<div class="paragraph">
-<p>In other words, in figuring out whether <code>AgreementRole</code> requires the persistence-by-reachability algorithm to run, it causes the adjacent associated entity <code>Party</code> to also be retrieved.</p>
-</div>
-</div>
-</div>
-<div class="sect2">
-<h3 id="_ugodn_configuring_using-jndi-data-source">2.5. Using JNDI DataSource</h3>
-<div class="paragraph">
-<p>Isis' JDO objectstore can be configured either to connect to the database using its own connection pool, or by using a container-managed datasource.</p>
-</div>
-<div class="sect3">
-<h4 id="_application_managed">2.5.1. Application managed</h4>
-<div class="paragraph">
-<p>Using a connection pool managed directly by the application (that is, by Apache Isis' JDO objectstore and ultimately by DataNucleus) requires a single set of configuration properties to be specified.</p>
-</div>
-<div class="paragraph">
-<p>In either <code>WEB-INF\isis.properties</code> file (or <code>WEB-INF\persistor.properties</code>, or <code>WEB-INF\persistor_datanucleus.properties</code>), specify the connection driver, url, username and password.</p>
-</div>
-<div class="paragraph">
-<p>For example:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code data-lang="ini">isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=net.sf.log4jdbc.DriverSpy
+}</code></pre> 
+          </div> 
+         </div> 
+         <div class="paragraph"> 
+          <p>DataNucleus\u2019s persistence-by-reachability algorithm adds the <code>AgreementRole</code> instances into a <code>SortedSet</code>, which causes <code>AgreementRole#compareTo()</code> to fire:</p> 
+         </div> 
+         <div class="ulist"> 
+          <ul> 
+           <li> <p>the evaluation of the "agreement" property delegates back to the <code>Agreement</code>, whose own <code>Agreement#compareTo()</code> uses the scalar <code>reference</code> property. As the <code>Agreement</code> is already in-memory, this does not trigger any further database queries</p> </li> 
+           <li> <p>the evaluation of the "startDate" property is just a scalar property of the <code>AgreementRole</code>, so will already in-memory</p> </li> 
+           <li> <p>the evaluation of the "party" property delegates back to the <code>Party</code>, whose own <code>Party#compareTo()</code> requires the uses the scalar <code>reference</code> property. However, since the <code>Party</code> is not yet in-memory, using the <code>reference</code> property triggers a database query to "rehydrate" the <code>Party</code> instance.</p> </li> 
+          </ul> 
+         </div> 
+         <div class="paragraph"> 
+          <p>In other words, in figuring out whether <code>AgreementRole</code> requires the persistence-by-reachability algorithm to run, it causes the adjacent associated entity <code>Party</code> to also be retrieved.</p> 
+         </div> 
+        </div> 
+       </div> 
+       <div class="sect2"> 
+        <h3 id="_ugodn_configuring_using-jndi-data-source">2.5. Using JNDI DataSource</h3> 
+        <div class="paragraph"> 
+         <p>Isis' JDO objectstore can be configured either to connect to the database using its own connection pool, or by using a container-managed datasource.</p> 
+        </div> 
+        <div class="sect3"> 
+         <h4 id="_application_managed">2.5.1. Application managed</h4> 
+         <div class="paragraph"> 
+          <p>Using a connection pool managed directly by the application (that is, by Apache Isis' JDO objectstore and ultimately by DataNucleus) requires a single set of configuration properties to be specified.</p> 
+         </div> 
+         <div class="paragraph"> 
+          <p>In either <code>WEB-INF\isis.properties</code> file (or <code>WEB-INF\persistor.properties</code>, or <code>WEB-INF\persistor_datanucleus.properties</code>), specify the connection driver, url, username and password.</p> 
+         </div> 
+         <div class="paragraph"> 
+          <p>For example:</p> 
+         </div> 
+         <div class="listingblock"> 
+          <div class="content"> 
+           <pre class="CodeRay highlight"><code data-lang="ini">isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName=net.sf.log4jdbc.DriverSpy
 isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL=jdbc:log4jdbc:hsqldb:mem:test
 isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName=sa
-isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=</code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Those configuration properties that start with the prefix <code>isis.persistor.datanucleus.impl.</code> are passed through directly to DataNucleus (with the prefix removed).</p>
-</div>
-<div class="paragraph">
-<p>It is also possible to specify the `
-datanucleus.ConnectionPasswordDecrypter
-` property; see the <a href="http://www.datanucleus.org/products/accessplatform_4_1/persistence_properties.html#ConnectionPasswordDecrypter">DataNucleus documentation</a> for further details.</p>
-</div>
-</div>
-<div class="sect3">
-<h4 id="_container_managed_jndi">2.5.2. Container managed (JNDI)</h4>
-<div class="paragraph">
-<p>Using a datasource managed by the servlet container requires three separate bits of configuration.</p>
-</div>
-<div class="paragraph">
-<p>Firstly, specify the name of the datasource in the <code>WEB-INF\persistor_datanucleus.properties</code> file. For example:</p>
-</div>
-<div class="paragraph">
-<p>If connection pool settings are also present in this file, they will simply be ignored. Any other configuration properties that start with the prefix <code>isis.persistor.datanucleus.impl.</code> are passed through directly to DataNucleus (with the prefix removed).</p>
-</div>
-<div class="paragraph">
-<p>Secondly, in the <code>WEB-INF/web.xml</code>, declare the resource reference:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;resource-ref&gt;</span>
+isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=</code></pre> 
+          </div> 
+         </div> 
+         <div class="paragraph"> 
+          <p>Those configuration properties that start with the prefix <code>isis.persistor.datanucleus.impl.</code> are passed through directly to DataNucleus (with the prefix removed).</p> 
+         </div> 
+         <div class="paragraph"> 
+          <p>It is also possible to specify the ` datanucleus.ConnectionPasswordDecrypter ` property; see the <a href="http://www.datanucleus.org/products/accessplatform_4_1/persistence_properties.html#ConnectionPasswordDecrypter">DataNucleus documentation</a> for further details.</p> 
+         </div> 
+        </div> 
+        <div class="sect3"> 
+         <h4 id="_container_managed_jndi">2.5.2. Container managed (JNDI)</h4> 
+         <div class="paragraph"> 
+          <p>Using a datasource managed by the servlet container requires three separate bits of configuration.</p> 
+         </div> 
+         <div class="paragraph"> 
+          <p>Firstly, specify the name of the datasource in the <code>WEB-INF\persistor_datanucleus.properties</code> file. For example:</p> 
+         </div> 
+         <div class="paragraph"> 
+          <p>If connection pool settings are also present in this file, they will simply be ignored. Any other configuration properties that start with the prefix <code>isis.persistor.datanucleus.impl.</code> are passed through directly to DataNucleus (with the prefix removed).</p> 
+         </div> 
+         <div class="paragraph"> 
+          <p>Secondly, in the <code>WEB-INF/web.xml</code>, declare the resource reference:</p> 
+         </div> 
+         <div class="listingblock"> 
+          <div class="content"> 
+           <pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;resource-ref&gt;</span>
     <span class="tag">&lt;description&gt;</span>db<span class="tag">&lt;/description&gt;</span>
     <span class="tag">&lt;res-ref-name&gt;</span>jdbc/simpleapp<span class="tag">&lt;/res-ref-name&gt;</span>
     <span class="tag">&lt;res-type&gt;</span>javax.sql.DataSource<span class="tag">&lt;/res-type&gt;</span>
     <span class="tag">&lt;res-auth&gt;</span>Container<span class="tag">&lt;/res-auth&gt;</span>
-<span class="tag">&lt;/resource-ref&gt;</span></code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p>Finally, declare the datasource as required by the servlet container. For example, if using Tomcat 7, the datasource can be specified by adding the following to <code>$TOMCAT_HOME/conf/context.xml</code>:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;Resource</span> <span class="attribute-name">name</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">jdbc/simpleapp</span><span class="delimiter">&quot;</span></span>
-  <span class="attribute-name">auth</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">Container</span><span class="delimiter">&quot;</span></span>
-  <span class="attribute-name">type</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">javax.sql.DataSource</span><span class="delimiter">&quot;</span></span>
-  <span class="attribute-name">maxActive</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">100</span><span class="delimiter">&quot;</span></span>
-  <span class="attribute-name">maxIdle</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">30</span><span class="delimiter">&quot;</span></span>
-  <span class="attribute-name">maxWait</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">10000</span><span class="delimiter">&quot;</span></span>
-  <span class="attribute-name">username</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">sa</span><span class="delimiter">&quot;</span></span>
-  <span class="attribute-name">password</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">p4ssword</span><span class="delimiter">&quot;</span></span>
-  <span class="attribute-name">driverClassName</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">com.microsoft.sqlserver.jdbc.SQLServerDriver</span><span class="delimiter">&quot;</span></span>
-  <span class="attribute-name">url</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">jdbc:sqlserver://127.0.0.1:1433;instance=.;databaseName=simpleapp</span><span class="delimiter">&quot;</span></span><span class="tag">/&gt;</span></code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p>You will also need to make sure that the JDBC driver is on the servlet container&#8217;s classpath. For Tomcat, this means copying the driver to <code>$TOMCAT_HOME/lib</code>.</p>
-</div>
-<div class="admonitionblock note">
-<table>
-<tr>
-<td class="icon">
-<i class="fa icon-note" title="Note"></i>
-</td>
-<td class="content">
-<div class="paragraph">
-<p>According to Tomcat&#8217;s documentation, it is supposedly possible to copy the <code>conf/context.xml</code> to the name of the webapp, eg <code>conf/mywebapp.xml</code>, and scope the connection to that webapp only.  I was unable to get this working, however.</p>
-</div>
-</td>
-</tr>
-</table>
-</div>
-</div>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_ugodn_overriding-jdo-annotations">3. Overriding JDO Annotations</h2>
-<div class="sectionbody">
-<div class="paragraph">
-<p>The JDO Objectstore (or rather, the underlying DataNucleus implementation) builds its own persistence metamodel by reading both annotations on the class and also by searching for metadata in XML files. The metadata in the XML files takes precedence over the annotations, and so can be used to override metadata that is "hard-coded" in annotations.</p>
-</div>
-<div class="paragraph">
-<p>For example, as of 1.9.0 the various <a href="http://www.isisaddons.org">Isis addons</a> modules (not ASF) use schemas for each entity. For example, the <code>AuditEntry</code> entity in the <a href="http://github.com/isisaddons/isis-module-audit">audit module</a> is annotated as:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code data-lang="java"><span class="annotation">@javax</span>.jdo.annotations.PersistenceCapable(
+<span class="tag">&lt;/resource-ref&gt;</span></code></pre> 
+          </div> 
+         </div> 
+         <div class="paragraph"> 
+          <p>Finally, declare the datasource as required by the servlet container. For example, if using Tomcat 7, the datasource can be specified by adding the following to <code>$TOMCAT_HOME/conf/context.xml</code>:</p> 
+         </div> 
+         <div class="listingblock"> 
+          <div class="content"> 
+           <pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;Resource</span> <span class="attribute-name">name</span>=<span class="string"><span class="delimiter">"</span><span class="content">jdbc/simpleapp</span><span class="delimiter">"</span></span>
+  <span class="attribute-name">auth</span>=<span class="string"><span class="delimiter">"</span><span class="content">Container</span><span class="delimiter">"</span></span>
+  <span class="attribute-name">type</span>=<span class="string"><span class="delimiter">"</span><span class="content">javax.sql.DataSource</span><span class="delimiter">"</span></span>
+  <span class="attribute-name">maxActive</span>=<span class="string"><span class="delimiter">"</span><span class="content">100</span><span class="delimiter">"</span></span>
+  <span class="attribute-name">maxIdle</span>=<span class="string"><span class="delimiter">"</span><span class="content">30</span><span class="delimiter">"</span></span>
+  <span class="attribute-name">maxWait</span>=<span class="string"><span class="delimiter">"</span><span class="content">10000</span><span class="delimiter">"</span></span>
+  <span class="attribute-name">username</span>=<span class="string"><span class="delimiter">"</span><span class="content">sa</span><span class="delimiter">"</span></span>
+  <span class="attribute-name">password</span>=<span class="string"><span class="delimiter">"</span><span class="content">p4ssword</span><span class="delimiter">"</span></span>
+  <span class="attribute-name">driverClassName</span>=<span class="string"><span class="delimiter">"</span><span class="content">com.microsoft.sqlserver.jdbc.SQLServerDriver</span><span class="delimiter">"</span></span>
+  <span class="attribute-name">url</span>=<span class="string"><span class="delimiter">"</span><span class="content">jdbc:sqlserver://127.0.0.1:1433;instance=.;databaseName=simpleapp</span><span class="delimiter">"</span></span><span class="tag">/&gt;</span></code></pre> 
+          </div> 
+         </div> 
+         <div class="paragraph"> 
+          <p>You will also need to make sure that the JDBC driver is on the servlet container\u2019s classpath. For Tomcat, this means copying the driver to <code>$TOMCAT_HOME/lib</code>.</p> 
+         </div> 
+         <div class="admonitionblock note"> 
+          <table> 
+           <tbody>
+            <tr> 
+             <td class="icon"> <i class="fa icon-note" title="Note"></i> </td> 
+             <td class="content"> 
+              <div class="paragraph"> 
+               <p>According to Tomcat\u2019s documentation, it is supposedly possible to copy the <code>conf/context.xml</code> to the name of the webapp, eg <code>conf/mywebapp.xml</code>, and scope the connection to that webapp only. I was unable to get this working, however.</p> 
+              </div> </td> 
+            </tr> 
+           </tbody>
+          </table> 
+         </div> 
+        </div> 
+       </div> 
+      </div> 
+     </div> 
+     <div class="sect1"> 
+      <h2 id="_ugodn_overriding-jdo-annotations">3. Overriding JDO Annotations</h2>
+      <button type="button" class="button secondary" onclick="window.location.href=&quot;https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/_ugodn_overriding-jdo-annotations.adoc&quot;" style="float: right; font-size: small; padding: 6px; margin-top: -55px; "><i class="fa fa-pencil-square-o"></i>&nbsp;Edit</button> 
+      <div class="sectionbody"> 
+       <div class="paragraph"> 
+        <p>The JDO Objectstore (or rather, the underlying DataNucleus implementation) builds its own persistence metamodel by reading both annotations on the class and also by searching for metadata in XML files. The metadata in the XML files takes precedence over the annotations, and so can be used to override metadata that is "hard-coded" in annotations.</p> 
+       </div> 
+       <div class="paragraph"> 
+        <p>For example, as of 1.9.0 the various <a href="http://www.isisaddons.org">Isis addons</a> modules (not ASF) use schemas for each entity. For example, the <code>AuditEntry</code> entity in the <a href="http://github.com/isisaddons/isis-module-audit">audit module</a> is annotated as:</p> 
+       </div> 
+       <div class="listingblock"> 
+        <div class="content"> 
+         <pre class="CodeRay highlight"><code data-lang="java"><span class="annotation">@javax</span>.jdo.annotations.PersistenceCapable(
         identityType=IdentityType.DATASTORE,
-        schema = <span class="string"><span class="delimiter">&quot;</span><span class="content">IsisAddonsAudit</span><span class="delimiter">&quot;</span></span>,
-        table=<span class="string"><span class="delimiter">&quot;</span><span class="content">AuditEntry</span><span class="delimiter">&quot;</span></span>)
+        schema = <span class="string"><span class="delimiter">"</span><span class="content">IsisAddonsAudit</span><span class="delimiter">"</span></span>,
+        table=<span class="string"><span class="delimiter">"</span><span class="content">AuditEntry</span><span class="delimiter">"</span></span>)
 <span class="directive">public</span> <span class="type">class</span> <span class="class">AuditEntry</span> {
     ...
-}</code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p>This will map the <code>AuditEntry</code> class to a table <code>&quot;IsisAddonsAudit&quot;.&quot;AuditEntry&quot;</code>; that is using a custom schema to own the object.</p>
-</div>
-<div class="paragraph">
-<p>Suppose though that for whatever reason we didn&#8217;t want to use a custom schema but would rather use the default. We can override the above annotation using a <code>package.jdo</code> file, for example:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code data-lang="xml"><span class="preprocessor">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;</span>
-<span class="tag">&lt;jdo</span> <span class="attribute-name">xmlns</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">http://xmlns.jcp.org/xml/ns/jdo/jdo</span><span class="delimiter">&quot;</span></span>
-    <span class="attribute-name">xmlns:xsi</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">http://www.w3.org/2001/XMLSchema-instance</span><span class="delimiter">&quot;</span></span>
-    <span class="attribute-name">xsi:schemaLocation</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">http://xmlns.jcp.org/xml/ns/jdo/jdo</span>
-        <span class="content">http://xmlns.jcp.org/xml/ns/jdo/jdo_3_0.xsd</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">version</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">3.0</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
-    <span class="tag">&lt;package</span> <span class="attribute-name">name</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">org.isisaddons.module.audit.dom</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
-        <span class="tag">&lt;class</span> <span class="attribute-name">name</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">AuditEntry</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">schema</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">PUBLIC</span><span class="delimiter">&quot;</span></span> <span class="attribute-name">table</span>=<span class="string"><span class="delimiter">&quot;</span><span class="content">IsisAddonsAuditEntry</span><span class="delimiter">&quot;</span></span><span class="tag">&gt;</span>
+}</code></pre> 
+        </div> 
+       </div> 
+       <div class="paragraph"> 
+        <p>This will map the <code>AuditEntry</code> class to a table <code>"IsisAddonsAudit"."AuditEntry"</code>; that is using a custom schema to own the object.</p> 
+       </div> 
+       <div class="paragraph"> 
+        <p>Suppose though that for whatever reason we didn\u2019t want to use a custom schema but would rather use the default. We can override the above annotation using a <code>package.jdo</code> file, for example:</p> 
+       </div> 
+       <div class="listingblock"> 
+        <div class="content"> 
+         <pre class="CodeRay highlight"><code data-lang="xml"><span class="preprocessor">&lt;?xml version="1.0" encoding="UTF-8" ?&gt;</span>
+<span class="tag">&lt;jdo</span> <span class="attribute-name">xmlns</span>=<span class="string"><span class="delimiter">"</span><span class="content">http://xmlns.jcp.org/xml/ns/jdo/jdo</span><span class="delimiter">"</span></span>
+    <span class="attribute-name">xmlns:xsi</span>=<span class="string"><span class="delimiter">"</span><span class="content">http://www.w3.org/2001/XMLSchema-instance</span><span class="delimiter">"</span></span>
+    <span class="attribute-name">xsi:schemaLocation</span>=<span class="string"><span class="delimiter">"</span><span class="content">http://xmlns.jcp.org/xml/ns/jdo/jdo</span> <span class="content">http://xmlns.jcp.org/xml/ns/jdo/jdo_3_0.xsd</span><span class="delimiter">"</span></span> <span class="attribute-name">version</span>=<span class="string"><span class="delimiter">"</span><span class="content">3.0</span><span class="delimiter">"</span></span><span class="tag">&gt;</span>
+    <span class="tag">&lt;package</span> <span class="attribute-name">name</span>=<span class="string"><span class="delimiter">"</span><span class="content">org.isisaddons.module.audit.dom</span><span class="delimiter">"</span></span><span class="tag">&gt;</span>
+        <span class="tag">&lt;class</span> <span class="attribute-name">name</span>=<span class="string"><span class="delimiter">"</span><span class="content">AuditEntry</span><span class="delimiter">"</span></span> <span class="attribute-name">schema</span>=<span class="string"><span class="delimiter">"</span><span class="content">PUBLIC</span><span class="delimiter">"</span></span> <span class="attribute-name">table</span>=<span class="string"><span class="delimiter">"</span><span class="content">IsisAddonsAuditEntry</span><span class="delimiter">"</span></span><span class="tag">&gt;</span>
         <span class="tag">&lt;/class&gt;</span>
     <span class="tag">&lt;/package&gt;</span>
-<span class="tag">&lt;/jdo&gt;</span></code></pre>
-</div>
-</div>
-<div class="paragraph">
-<p>This file should be placed can be placed in <code>src/main/java/META-INF</code> within your application&#8217;s <code>dom</code> module.</p>
-</div>
-<div class="admonitionblock tip">
-<table>
-<tr>
-<td class="icon">
-<i class="fa icon-tip" title="Tip"></i>
-</td>
-<td class="content">
-<div class="paragraph">
-<p>You can use a mixin action on <a href="rgcms.html#_rgcms_classes_mixins_Persistable"><code>Persistable</code></a> mixin
-to download the JDO class metadata in XML form.</p>
-</div>
-</td>
-</tr>
-</table>
-</div>
-<div class="admonitionblock note">
-<table>
-<tr>
-<td class="icon">
-<i class="fa icon-note" title="Note"></i>
-</td>
-<td class="content">
-<div class="ulist">
-<ul>
-<li>
-<p>The same approach should work for any other JDO metadata, but some experimentation might be required.+</p>
-<div class="paragraph">
-<p>For example, in writing up the above example we found that writing <code>schema=&quot;&quot;</code> (in an attempt to say, "use the default schema for this table") actually caused the original annotation value to be used instead.</p>
-</div>
-</li>
-<li>
-<p>Forcing the schema to "PUBLIC" (as in the above example) works, but it isn&#8217;t ideal because the name "PUBLIC" is not vendor-neutral (it works for HSQLDB, but MS SQL Server uses "dbo" as its default).</p>
-</li>
-<li>
-<p>As of 1.9.0 Apache Isis will automatically (attempt) to create the owning schema for a given table if it does not exist. This behaviour can be customized, as described in the section on <a href="#_ugbtb_decoupling_db-schemas">using modules</a>.</p>
-</li>
-<li>
-<p>You may need to override the entire class metadata rather than individual elements; the mixin mentioned above can help here.</p>
-</li>
-</ul>
-</div>
-</td>
-</tr>
-</table>
-</div>
-</div>
-</div>
-<div class="sect1">
-<h2 id="_ugodn_java8">4. Java8</h2>
-<div class="sectionbody">
-<div class="paragraph">
-<p>DataNucleus 4.x supports Java 7, but can also be used with Java 8, eg for streams support against collections managed
-by DataNucleus.</p>
-</div>
-<div class="paragraph">
-<p>Just include within <code>&lt;dependencies&gt;</code> of your <code>dom</code> module&#8217;s <code>pom.xml</code>:</p>
-</div>
-<div class="listingblock">
-<div class="content">
-<pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;dependency&gt;</span>
+<span class="tag">&lt;/jdo&gt;</span></code></pre> 
+        </div> 
+       </div> 
+       <div class="paragraph"> 
+        <p>This file should be placed can be placed in <code>src/main/java/META-INF</code> within your application\u2019s <code>dom</code> module.</p> 
+       </div> 
+       <div class="admonitionblock tip"> 
+        <table> 
+         <tbody>
+          <tr> 
+           <td class="icon"> <i class="fa icon-tip" title="Tip"></i> </td> 
+           <td class="content"> 
+            <div class="paragraph"> 
+             <p>You can use a mixin action on <a href="rgcms.html#_rgcms_classes_mixins_Persistable"><code>Persistable</code></a> mixin to download the JDO class metadata in XML form.</p> 
+            </div> </td> 
+          </tr> 
+         </tbody>
+        </table> 
+       </div> 
+       <div class="admonitionblock note"> 
+        <table> 
+         <tbody>
+          <tr> 
+           <td class="icon"> <i class="fa icon-note" title="Note"></i> </td> 
+           <td class="content"> 
+            <div class="ulist"> 
+             <ul> 
+              <li> <p>The same approach should work for any other JDO metadata, but some experimentation might be required.+</p> 
+               <div class="paragraph"> 
+                <p>For example, in writing up the above example we found that writing <code>schema=""</code> (in an attempt to say, "use the default schema for this table") actually caused the original annotation value to be used instead.</p> 
+               </div> </li> 
+              <li> <p>Forcing the schema to "PUBLIC" (as in the above example) works, but it isn\u2019t ideal because the name "PUBLIC" is not vendor-neutral (it works for HSQLDB, but MS SQL Server uses "dbo" as its default).</p> </li> 
+              <li> <p>As of 1.9.0 Apache Isis will automatically (attempt) to create the owning schema for a given table if it does not exist. This behaviour can be customized, as described in the section on <a href="#_ugbtb_decoupling_db-schemas">using modules</a>.</p> </li> 
+              <li> <p>You may need to override the entire class metadata rather than individual elements; the mixin mentioned above can help here.</p> </li> 
+             </ul> 
+            </div> </td> 
+          </tr> 
+         </tbody>
+        </table> 
+       </div> 
+      </div> 
+     </div> 
+     <div class="sect1"> 
+      <h2 id="_ugodn_java8">4. Java8</h2>
+      <button type="button" class="button secondary" onclick="window.location.href=&quot;https://github.com/apache/isis/edit/master/adocs/documentation/src/main/asciidoc/guides/_ugodn_java8.adoc&quot;" style="float: right; font-size: small; padding: 6px; margin-top: -55px; "><i class="fa fa-pencil-square-o"></i>&nbsp;Edit</button> 
+      <div class="sectionbody"> 
+       <div class="paragraph"> 
+        <p>DataNucleus 4.x supports Java 7, but can also be used with Java 8, eg for streams support against collections managed by DataNucleus.</p> 
+       </div> 
+       <div class="paragraph"> 
+        <p>Just include within <code>&lt;dependencies&gt;</code> of your <code>dom</code> module\u2019s <code>pom.xml</code>:</p> 
+       </div> 
+       <div class="listingblock"> 
+        <div class="content"> 
+         <pre class="CodeRay highlight"><code data-lang="xml"><span class="tag">&lt;dependency&gt;</span>
     <span class="tag">&lt;groupId&gt;</span>org.datanucleus<span class="tag">&lt;/groupId&gt;</span>
     <span class="tag">&lt;artifactId&gt;</span>datanucleus-java8<span class="tag">&lt;/artifactId&gt;</span>
     <span class="tag">&lt;version&gt;</span>4.2.0-release<span class="tag">&lt;/version&gt;</span>t
-<span class="tag">&lt;/dependency&gt;</span></code></pre>
-</div>
-</div>
-<div class="admonitionblock note">
-<table>
-<tr>
-<td class="icon">
-<i class="fa icon-note" title="Note"></i>
-</td>
-<td class="content">
-<div class="paragraph">
-<p>The DataNucleus website includes a <a href="http://www.datanucleus.org/products/accessplatform/compatibility.html">page</a>
-listing version compatibility of these extensions vis-a-vis the core DataNucleus platform.</p>
-</div>
-</td>
-</tr>
-</table>
-</div>
-</div>
-</div>
-        </div>
-
-        <footer>
-          <hr>
-          <p class="small">
-          Copyright &copy; 2010~2016 The Apache&nbsp;Software&nbsp;Foundation, licensed under the Apache&nbsp;License,&nbsp;v2.0.
-          <br/>
-          Apache, the Apache feather logo, Apache&nbsp;Isis, and the Apache&nbsp;Isis project logo are all trademarks of The&nbsp;Apache&nbsp;Software&nbsp;Foundation.
-          </p>
-        </footer>
-
-    </div>
-
-    <div id="doc-content-right" class="large-3 medium-3 xcolumns">
-        <div id="toc" class="toc2">
-            <div class="fallback-toc">
-                <ul class="sectlevel1">
-<li><a href="#_ugdnos">1. DataNucleus Object Store</a>
-<ul class="sectlevel2">
-<li><a href="#_other_guides">1.1. Other Guides</a></li>
-</ul>
-</li>
-<li><a href="#_ugodn_configuring">2. Configuring DataNucleus</a>
-<ul class="sectlevel2">
-<li><a href="#_ugodn_configuring_properties">2.1. Configuration Properties</a>
-<ul class="sectlevel3">
-<li><a href="#_configuration_properties_for_apache_isis_itself">2.1.1. Configuration Properties for Apache Isis itself</a></li>
-<li><a href="#_configuration_properties_passed_through_directly_to_datanucleus">2.1.2. Configuration Properties passed through directly to DataNucleus.</a></li>
-</ul>
-</li>
-<li><a href="#_ugodn_configuring_persistence-xml">2.2. <code>persistence.xml</code></a></li>
-<li><a href="#_ugodn_configuring_eagerly-registering-entities">2.3. Eagerly Registering Entities</a></li>
-<li><a href="#_ugodn_configuring_disabling-persistence-by-reachability">2.4. Persistence by Reachability</a>
-<ul class="sectlevel3">
-<li><a href="#_the_issue_in_more_detail">2.4.1. The issue in more detail</a></li>
-</ul>
-</li>
-<li><a href="#_ugodn_configuring_using-jndi-data-source">2.5. Using JNDI DataSource</a>
-<ul class="sectlevel3">
-<li><a href="#_application_managed">2.5.1. Application managed</a></li>
-<li><a href="#_container_managed_jndi">2.5.2. Container managed (JNDI)</a></li>
-</ul>
-</li>
-</ul>
-</li>
-<li><a href="#_ugodn_overriding-jdo-annotations">3. Overriding JDO Annotations</a></li>
-<li><a href="#_ugodn_java8">4. Java8</a></li>
-</ul>
-            </div>
-        </div>
-    </div>
-
-</div>
-
-
-<script src="../js/foundation/5.5.1/vendor/jquery.js"></script>
-<script src="../js/foundation/5.5.1/foundation.min.js"></script>
-
-
-<link href="../css/jquery.tocify/1.9.0/jquery.tocify.css" rel="stylesheet">
-<script src="../js/jqueryui/1.11.4/jquery-ui.min.js"></script>
-<script src="../js/jquery.tocify/1.9.0/jquery.tocify.js"></script>
-
-
-
-<script type="text/javascript">
+<span class="tag">&lt;/dependency&gt;</span></code></pre> 
+        </div> 
+       </div> 
+       <div class="admonitionblock note"> 
+        <table> 
+         <tbody>
+          <tr> 
+           <td class="icon"> <i class="fa icon-note" title="Note"></i> </td> 
+           <td class="content"> 
+            <div class="paragraph"> 
+             <p>The DataNucleus website includes a <a href="http://www.datanucleus.org/products/accessplatform/compatibility.html">page</a> listing version compatibility of these extensions vis-a-vis the core DataNucleus platform.</p> 
+            </div> </td> 
+          </tr> 
+         </tbody>
+        </table> 
+       </div> 
+      </div> 
+     </div> 
+    </div> 
+    <footer> 
+     <hr> 
+     <p class="small"> Copyright � 2010~2016 The Apache&nbsp;Software&nbsp;Foundation, licensed under the Apache&nbsp;License,&nbsp;v2.0. <br> Apache, the Apache feather logo, Apache&nbsp;Isis, and the Apache&nbsp;Isis project logo are all trademarks of The&nbsp;Apache&nbsp;Software&nbsp;Foundation. </p> 
+    </footer> 
+   </div> 
+   <div id="doc-content-right" class="large-3 medium-3 xcolumns"> 
+    <div id="toc" class="toc2"> 
+     <div class="fallback-toc"> 
+      <ul class="sectlevel1"> 
+       <li><a href="#_ugdnos">1. DataNucleus Object Store</a> 
+        <ul class="sectlevel2"> 
+         <li><a href="#_other_guides">1.1. Other Guides</a></li> 
+        </ul> </li> 
+       <li><a href="#_ugodn_configuring">2. Configuring DataNucleus</a> 
+        <ul class="sectlevel2"> 
+         <li><a href="#_ugodn_configuring_properties">2.1. Configuration Properties</a> 
+          <ul class="sectlevel3"> 
+           <li><a href="#_configuration_properties_for_apache_isis_itself">2.1.1. Configuration Properties for Apache Isis itself</a></li> 
+           <li><a href="#_configuration_properties_passed_through_directly_to_datanucleus">2.1.2. Configuration Properties passed through directly to DataNucleus.</a></li> 
+          </ul> </li> 
+         <li><a href="#_ugodn_configuring_persistence-xml">2.2. <code>persistence.xml</code></a></li> 
+         <li><a href="#_ugodn_configuring_eagerly-registering-entities">2.3. Eagerly Registering Entities</a></li> 
+         <li><a href="#_ugodn_configuring_disabling-persistence-by-reachability">2.4. Persistence by Reachability</a> 
+          <ul class="sectlevel3"> 
+           <li><a href="#_the_issue_in_more_detail">2.4.1. The issue in more detail</a></li> 
+          </ul> </li> 
+         <li><a href="#_ugodn_configuring_using-jndi-data-source">2.5. Using JNDI DataSource</a> 
+          <ul class="sectlevel3"> 
+           <li><a href="#_application_managed">2.5.1. Application managed</a></li> 
+           <li><a href="#_container_managed_jndi">2.5.2. Container managed (JNDI)</a></li> 
+          </ul> </li> 
+        </ul> </li> 
+       <li><a href="#_ugodn_overriding-jdo-annotations">3. Overriding JDO Annotations</a></li> 
+       <li><a href="#_ugodn_java8">4. Java8</a></li> 
+      </ul> 
+     </div> 
+    </div> 
+   </div> 
+  </div> 
+  <script src="../js/foundation/5.5.1/vendor/jquery.js"></script> 
+  <script src="../js/foundation/5.5.1/foundation.min.js"></script> 
+  <link href="../css/jquery.tocify/1.9.0/jquery.tocify.css" rel="stylesheet"> 
+  <script src="../js/jqueryui/1.11.4/jquery-ui.min.js"></script> 
+  <script src="../js/jquery.tocify/1.9.0/jquery.tocify.js"></script> 
+  <script type="text/javascript">
     $(function () {
         $("#toc").tocify({
             scrollTo: 50,
@@ -1171,9 +1070,8 @@ listing version compatibility of these extensions vis-a-vis the core DataNucleus
         });
         $(".fallback-toc").hide();
     });
-</script>
-
-<script type="text/javascript">
+</script> 
+  <script type="text/javascript">
 
   /****
 
@@ -1283,9 +1181,8 @@ listing version compatibility of these extensions vis-a-vis the core DataNucleus
 
     ***/
 
-</script>
-
-<script type="text/javascript">
+</script> 
+  <script type="text/javascript">
 
 $(document).ready(function(){
     if("Documentation" === "DataNucleus Object Store") {
@@ -1297,10 +1194,8 @@ $(document).ready(function(){
 
 });
 
-</script>
-
-
-<script>
+</script> 
+  <script>
 
 $( document ).ready(function() {
 
@@ -1391,7 +1286,6 @@ $( document ).ready(function() {
 
 
 });
-</script>
-
-</body>
+</script>  
+ </body>
 </html>