ISIS-1532: moves DN OS config props to the DN user guide

Project: http://git-wip-us.apache.org/repos/asf/isis-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis-site/commit/e39730ff
Tree: http://git-wip-us.apache.org/repos/asf/isis-site/tree/e39730ff
Diff: http://git-wip-us.apache.org/repos/asf/isis-site/diff/e39730ff

Branch: refs/heads/asf-site
Commit: e39730ffcc240d901f93879c85e640daf3b5156e
Parents: c7b0a07
Author: Dan Haywood <[email protected]>
Authored: Thu Nov 3 14:19:25 2016 +0000
Committer: Dan Haywood <[email protected]>
Committed: Thu Nov 3 14:19:25 2016 +0000

----------------------------------------------------------------------
 content/documentation.html |     2 +-
 content/guides/rgcfg.html  |   413 +-
 content/guides/rgcfg.pdf   | 10225 ++++++--------------------------------
 content/guides/ugbtb.html  |     4 +-
 content/guides/ugbtb.pdf   |  1481 +++---
 content/guides/ugodn.html  |   389 +-
 content/guides/ugodn.pdf   |  8425 +++++++++++++++++++++++++++++--
 7 files changed, 10585 insertions(+), 10354 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis-site/blob/e39730ff/content/documentation.html
----------------------------------------------------------------------
diff --git a/content/documentation.html b/content/documentation.html
index 9fae7be..3308427 100644
--- a/content/documentation.html
+++ b/content/documentation.html
@@ -638,7 +638,7 @@ table.CodeRay td.code>pre{padding:0}
 <p><strong><a href="./guides/rgsvc.html" target="_blank">Domain 
Services</a></strong>  <span class="image"><a class="image" 
href="./guides/rgsvc.pdf"><img src="images/PDF-50.png" alt="PDF 50" 
width="20px"></a></span></p>
 </li>
 <li>
-<p><a href="./guides/rgcfg.html" target="_blank">Configuration Properties</a>  
<span class="image"><a class="image" href="./guides/rgcfg.pdf"><img 
src="images/PDF-50.png" alt="PDF 50" width="20px"></a></span></p>
+<p><a href="./guides/rgcfg.html" target="_blank">Core Config&#8217;n 
Properties</a>  <span class="image"><a class="image" 
href="./guides/rgcfg.pdf"><img src="images/PDF-50.png" alt="PDF 50" 
width="20px"></a></span></p>
 </li>
 <li>
 <p><a href="./guides/rgcms.html" target="_blank">Classes, Methods and 
Schema</a>  <span class="image"><a class="image" href="./guides/rgcms.pdf"><img 
src="images/PDF-50.png" alt="PDF 50" width="20px"></a></span></p>

http://git-wip-us.apache.org/repos/asf/isis-site/blob/e39730ff/content/guides/rgcfg.html
----------------------------------------------------------------------
diff --git a/content/guides/rgcfg.html b/content/guides/rgcfg.html
index 1a27329..23b3b15 100644
--- a/content/guides/rgcfg.html
+++ b/content/guides/rgcfg.html
@@ -4,7 +4,7 @@
     <meta charset="utf-8"/>
     <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
 
-    <title>Configuration Properties</title>
+    <title>Core Config&#8217;n Properties</title>
 
     <!--
         Licensed to the Apache Software Foundation (ASF) under one
@@ -507,7 +507,8 @@ table.CodeRay td.code>pre{padding:0}
 <div class="sectionbody">
 <div class="paragraph">
 <p>Apache Isis' own configuration properties are simple key-value pairs, 
typically held in the <code>WEBINF/isis.properties</code>
-file and other related files. This guide describes how to configure an Apache 
Isis application.</p>
+file and other related files.
+This guide describes how to configure an Apache Isis application.</p>
 </div>
 <div class="admonitionblock note">
 <table>
@@ -517,14 +518,25 @@ file and other related files. This guide describes how to 
configure an Apache Is
 </td>
 <td class="content">
 <div class="paragraph">
-<p>Configuration properties for the viewers can be found in the <a 
href="ugvw.html">Wicket Viewer</a> guide
-and the <a href="ugvro.html">RestfulObjects viewer</a> guide.  
Likewise[details of configuring security (Apache Shiro) can be
-found in the <a href="ugsec.html">Security</a> guide.</p>
+<p>This guide covers only the core configuration properties (relating to 
Apache Isis' metamodel and runtime management).
+Configuration properties for the viewers can be found in the <a 
href="ugvw.html">Wicket Viewer</a> guide and the <a 
href="ugvro.html">RestfulObjects viewer</a> guide.
+Likewise details of configuring security (Apache Shiro) can be
+found in the <a href="ugsec.html">Security</a> guide, and details for 
configuring the DataNucleus Object Store can be found in the <a 
href="ugodn.html">DataNucleus</a> guide.</p>
 </div>
+</td>
+</tr>
+</table>
+</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>Also, note that by default the configuration values are part of the built 
WAR file.  Details on how to override these
-configuration properties externally for different environments can be found in 
the
-<a href="ugbtb.html#_ugbtb_deployment">Beyond the Basics</a> guide, 
(deployment chapter).</p>
+<p>By default the configuration values are part of the built WAR file.
+Details on how to override these configuration properties externally for 
different environments can be found in the <a 
href="ugbtb.html#_ugbtb_deployment">Beyond the Basics</a> guide, (deployment 
chapter).</p>
 </div>
 </td>
 </tr>
@@ -985,7 +997,7 @@ for Apache Isis and contribute back to the project)</p>
 </td>
 <td class="content">
 <div class="paragraph">
-<p>Configuration properties for the JDO/DataNucleus objectstore can be found 
in the <a href="#_rgcfg_configuring-datanucleus">Configuring DataNucleus</a> 
section later in this chapter, while configuration properties for the viewers 
can be found in the their respective chapters, <a 
href="ugvw.html#_ugvw_configuration-properties">here for Wicket viewer</a>, and 
<a href="ugvro.html#_ugvro_configuration-properties">here for the Restful 
Objects viewer</a>.</p>
+<p>Configuration properties for the JDO/DataNucleus objectstore can be found 
in the <a href="ugodn.html#_ugodn_configuring">Configuring DataNucleus</a> 
section later in this chapter, while configuration properties for the viewers 
can be found in the their respective chapters, <a 
href="ugvw.html#_ugvw_configuration-properties">here for Wicket viewer</a>, and 
<a href="ugvro.html#_ugvro_configuration-properties">here for the Restful 
Objects viewer</a>.</p>
 </div>
 </td>
 </tr>
@@ -1879,364 +1891,6 @@ frustrating to have to annotate every property.</p>
 </div>
 </div>
 </div>
-<div class="sect1">
-<h2 id="_rgcfg_configuring-datanucleus">6. 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="_rgcfg_configuring-datanucleus_properties">6.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">6.1.1. Configuration 
Properties for Apache Isis itself</h4>
-<table class="tableblock frame-all grid-all spread">
-<caption class="title">Table 9. 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="#_rgcfg_configuring-datanucleus_eagerly-registering-entities">discussion 
below</a>.</p>
-</div>
-<div class="paragraph">
-<p>This property is IGNORED if the <a 
href="#_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">6.1.2. 
Configuration Properties passed through directly to DataNucleus.</h4>
-<table class="tableblock frame-all grid-all spread">
-<caption class="title">Table 10. 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="#_rgcfg_configuring-datanucleus_disabling-persistence-by-reachability">discussion
 below</a>.</p>
-</div></div></td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
-<div class="sect2">
-<h3 id="_rgcfg_configuring-datanucleus_persistence-xml">6.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="_rgcfg_configuring-datanucleus_eagerly-registering-entities">6.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_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="_rgcfg_configuring-datanucleus_disabling-persistence-by-reachability">6.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">6.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>);
-    }
-}</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>);
-    }
-}</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>);
-    }
-}</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="_rgcfg_configuring-datanucleus_using-jndi-data-source">6.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">6.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 the <code>WEB-INF\persistor_datanucleus.properties</code> file, 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>
-<div class="sect3">
-<h4 id="_container_managed_jndi">6.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>
 
         <footer>
@@ -2287,29 +1941,6 @@ 
isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=</code></pre
 </li>
 </ul>
 </li>
-<li><a href="#_rgcfg_configuring-datanucleus">6. Configuring DataNucleus</a>
-<ul class="sectlevel2">
-<li><a href="#_rgcfg_configuring-datanucleus_properties">6.1. Configuration 
Properties</a>
-<ul class="sectlevel3">
-<li><a href="#_configuration_properties_for_apache_isis_itself">6.1.1. 
Configuration Properties for Apache Isis itself</a></li>
-<li><a 
href="#_configuration_properties_passed_through_directly_to_datanucleus">6.1.2. 
Configuration Properties passed through directly to DataNucleus.</a></li>
-</ul>
-</li>
-<li><a href="#_rgcfg_configuring-datanucleus_persistence-xml">6.2. 
<code>persistence.xml</code></a></li>
-<li><a 
href="#_rgcfg_configuring-datanucleus_eagerly-registering-entities">6.3. 
Eagerly Registering Entities</a></li>
-<li><a 
href="#_rgcfg_configuring-datanucleus_disabling-persistence-by-reachability">6.4.
 Persistence by Reachability</a>
-<ul class="sectlevel3">
-<li><a href="#_the_issue_in_more_detail">6.4.1. The issue in more 
detail</a></li>
-</ul>
-</li>
-<li><a href="#_rgcfg_configuring-datanucleus_using-jndi-data-source">6.5. 
Using JNDI DataSource</a>
-<ul class="sectlevel3">
-<li><a href="#_application_managed">6.5.1. Application managed</a></li>
-<li><a href="#_container_managed_jndi">6.5.2. Container managed (JNDI)</a></li>
-</ul>
-</li>
-</ul>
-</li>
 </ul>
             </div>
         </div>
@@ -2458,7 +2089,7 @@ 
isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword=</code></pre
 <script type="text/javascript">
 
 $(document).ready(function(){
-    if("Documentation" === "Configuration Properties") {
+    if("Documentation" === "Core Config&#8217;n Properties") {
         console.log( "processing 'Documentation'" );
 
         
$("#doc-content-left").removeClass("large-9").removeClass("medium-9").addClass("large-12").addClass("medium-12");

Reply via email to