You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by re...@apache.org on 2022/07/07 09:59:51 UTC

svn commit: r1902520 [6/23] - in /jackrabbit/site/live/jcr: ./ components/ css/ fonts/ js/ ocm/ status/

Modified: jackrabbit/site/live/jcr/embedded-repository.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/jcr/embedded-repository.html?rev=1902520&r1=1902519&r2=1902520&view=diff
==============================================================================
--- jackrabbit/site/live/jcr/embedded-repository.html (original)
+++ jackrabbit/site/live/jcr/embedded-repository.html Thu Jul  7 09:59:50 2022
@@ -1,42 +1,40 @@
 <!DOCTYPE html>
+
+
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.9.2 from src\site\markdown/embedded-repository.md at 2022-05-09
- | Rendered using Apache Maven Fluido Skin 1.9
+ | Generated by Apache Maven Doxia Site Renderer 1.11.1 from src\site\markdown/embedded-repository.md at 2022-07-07
+ | Rendered using Apache Maven Fluido Skin 1.11.1
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1" />
-    <meta name="generator" content="Apache Maven Doxia Site Renderer 1.9.2" />
+    <meta name="generator" content="Apache Maven Doxia Site Renderer 1.11.1" />
     <title>Apache Jackrabbit &#x2013; Embedded Repository</title>
-    <link rel="stylesheet" href="./css/apache-maven-fluido-1.9.min.css" />
+    <link rel="stylesheet" href="./css/apache-maven-fluido-1.11.1.min.css" />
     <link rel="stylesheet" href="./css/site.css" />
     <link rel="stylesheet" href="./css/print.css" media="print" />
-    <script src="./js/apache-maven-fluido-1.9.min.js"></script>
-<!-- Matomo -->
-<script>
-  var _paq = window._paq = window._paq || [];
-  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
-  /* We explicitly disable cookie tracking to avoid privacy issues */
-  _paq.push(['disableCookies']);
-  _paq.push(['trackPageView']);
-  _paq.push(['enableLinkTracking']);
-  (function() {
-    var u="https://matomo.privacy.apache.org/";
-    _paq.push(['setTrackerUrl', u+'matomo.php']);
-    _paq.push(['setSiteId', '4']);
-    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
-    g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
-  })();
-</script>
-<!-- End Matomo Code -->
+    <script src="./js/apache-maven-fluido-1.11.1.min.js"></script>
+
+    <!-- Matomo -->
+    <script>
+        var _paq = window._paq = window._paq || [];
+                _paq.push(['disableCookies']);
+                    _paq.push(['trackPageView']);
+                    _paq.push(['enableLinkTracking']);
+        
+        (function() {
+            var u="https://analytics.apache.org";
+            _paq.push(['setTrackerUrl', u+'/matomo.php']);
+            _paq.push(['setSiteId', '4']);
+            var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+            g.async=true; g.src=u+'/matomo.js'; s.parentNode.insertBefore(g,s);
+        })();
+    </script>
+    <!-- End Matomo Code -->
   </head>
   <body class="topBarEnabled">
-    <a href="https://github.com/apache/jackrabbit">
-      <img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;"
-        src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"
-        alt="Fork me on GitHub">
-    </a>
+    <a class="github-fork-ribbon right-top" href="https://github.com/apache/jackrabbit" data-ribbon="Fork me on GitHub" title="Fork me on GitHub">Fork me on GitHub</a>
     <header id="topbar" class="navbar navbar-fixed-top ">
       <div class="navbar-inner">
         <div class="container-fluid">
@@ -49,7 +47,7 @@
 </a>
             <ul class="nav">
       <li class="dropdown">
-        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache Jackrabbit <b class="caret"></b></a>
+        <a class="dropdown-toggle" data-toggle="dropdown">Apache Jackrabbit <b class="caret"></b></a>
         <ul class="dropdown-menu">
             <li><a href="index.html" title="Welcome">Welcome</a></li>
             <li><a href="downloads.html" title="Downloads">Downloads</a></li>
@@ -60,7 +58,7 @@
         </ul>
       </li>
       <li class="dropdown">
-        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Documentation <b class="caret"></b></a>
+        <a class="dropdown-toggle" data-toggle="dropdown">Documentation <b class="caret"></b></a>
         <ul class="dropdown-menu">
             <li><a href="getting-started-with-apache-jackrabbit.html" title="Getting Started">Getting Started</a></li>
             <li><a href="standalone-server.html" title="Standalone Server">Standalone Server</a></li>
@@ -75,7 +73,7 @@
         </ul>
       </li>
       <li class="dropdown">
-        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Development <b class="caret"></b></a>
+        <a class="dropdown-toggle" data-toggle="dropdown">Development <b class="caret"></b></a>
         <ul class="dropdown-menu">
             <li><a href="jackrabbit-team.html" title="Jackrabbit Team">Jackrabbit Team</a></li>
             <li><a href="jackrabbit-roadmap.html" title="Jackrabbit Roadmap">Jackrabbit Roadmap</a></li>
@@ -90,7 +88,7 @@
         </ul>
       </li>
       <li class="dropdown">
-        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache Software Foundation <b class="caret"></b></a>
+        <a class="dropdown-toggle" data-toggle="dropdown">Apache Software Foundation <b class="caret"></b></a>
         <ul class="dropdown-menu">
             <li><a href="https://www.apache.org/foundation/how-it-works.html" title="Introduction">Introduction</a></li>
             <li><a href="https://www.apache.org/foundation/sponsorship.html" title="Sponsorship">Sponsorship</a></li>
@@ -105,7 +103,7 @@
     <div class="container-fluid">
       <header>
         <div id="banner">
-          <div class="pull-left"><div id="bannerLeft"><h2>Apache Jackrabbit Site</h2>
+          <div class="pull-left"><div id="bannerLeft"><h1>Apache Jackrabbit Site</h1>
 </div>
 </div>
           <div class="pull-right"></div>
@@ -114,7 +112,7 @@
 
         <div id="breadcrumbs">
           <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2022-05-09</li>
+        <li id="publishDate">Last Published: 2022-07-07</li>
           </ul>
         </div>
       </header>
@@ -159,7 +157,6 @@
   </ul>
           </nav>
           <div class="well sidebar-nav">
-            <hr />
             <div id="poweredBy">
               <div class="clear"></div>
               <div class="clear"></div>
@@ -186,13 +183,22 @@
    limitations under the License.
 -->
 <h1>Embedded Repository</h1>
-<p>You can run Jackrabbit in embedded mode inside your application if you only (or mostly) access a repository from that one application. In this deployment model the Jackrabbit dependencies are included directly in your classpath and your application is in full control of the repository lifecycle. To use this deployment model you need to add the appropriate dependencies to your application and include a few lines of Jackrabbit-specific code to start and stop a repository. You can then use the standard JCR API to access and manage content inside the repository.</p>
+<p>You can run Jackrabbit in embedded mode inside your application if you only
+(or mostly) access a repository from that one application. In this
+deployment model the Jackrabbit dependencies are included directly in your
+classpath and your application is in full control of the repository
+lifecycle. To use this deployment model you need to add the appropriate
+dependencies to your application and include a few lines of
+Jackrabbit-specific code to start and stop a repository. You can then use
+the standard JCR API to access and manage content inside the repository.</p>
 <p>This page describes how to embed Jackrabbit in your application.</p><section>
 <h2><a name="Jackrabbit_dependencies"></a>Jackrabbit dependencies</h2>
-<p>To use Jackrabbit in embedded mode you need to make sure that the JCR API and all required Jackrabbit libraries are included in your classpath. If you use <a class="externalLink" href="http://maven.apache.org/">Maven 2</a> , you can achieve this by specifying the following dependencies.</p>
+<p>To use Jackrabbit in embedded mode you need to make sure that the JCR API
+and all required Jackrabbit libraries are included in your classpath. If
+you use <a class="externalLink" href="http://maven.apache.org/">Maven 2</a>
+, you can achieve this by specifying the following dependencies.</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">&lt;dependency&gt;
+<div class="source"><pre class="prettyprint linenums"><code>&lt;dependency&gt;
   &lt;groupId&gt;javax.jcr&lt;/groupId&gt;
   &lt;artifactId&gt;jcr&lt;/artifactId&gt;
   &lt;version&gt;1.0&lt;/version&gt;
@@ -218,15 +224,31 @@
   &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
   &lt;version&gt;1.5.3&lt;/version&gt;
 &lt;/dependency&gt;
-</pre></div></div>
-
-<p>The jcr dependency includes the JCR 1.0 API in your classpath. You need to explicitly declare this dependency as in jackrabbit-core the JCR API dependency scope is <i>provided</i> to work better in deployment models where the JCR API is shared between multiple applications.</p>
-<p>The jackrabbit-core dependency pulls in the Jackrabbit content repository implementation and a set of transitive dependencies needed by Jackrabbit. See the <a href="downloads.html">Downloads</a> page for the latest available version.</p>
-<p>Jackrabbit uses the <a class="externalLink" href="http://www.slf4j.org/">SLF4J</a> for logging and leaves it up to the embedding application to decide which underlying logging library to use. In the example above we use the slf4j-log4j12 library which uses <a class="externalLink" href="http://logging.apache.org/log4j/1.2/">log4j 1.2</a> for handling the log messages. Note that the commons-logging dependency (which is a transitive dependency from <a class="externalLink" href="http://poi.apache.org/">Apache POI</a> ) is explicitly replaced with the jcl-over-slf4j dependency that routes also all <a class="externalLink" href="http://commons.apache.org/logging/">Commons Logging</a> log messages through the selected SLF4J implementation. Jackrabbit 1.5.x uses SLF4J version 1.5.3.</p>
-<p>The full set of compile-scope dependencies included by the above declaration is shown below. If you use a build tool like <a class="externalLink" href="http://ant.apache.org/">Ant</a> where you need to explicitly include all dependencies, you can use this list to correctly configure your classpath.</p>
+</code></pre></div>
+<p>The jcr dependency includes the JCR 1.0 API in your classpath. You need to
+explicitly declare this dependency as in jackrabbit-core the JCR API
+dependency scope is <i>provided</i> to work better in deployment models where
+the JCR API is shared between multiple applications.</p>
+<p>The jackrabbit-core dependency pulls in the Jackrabbit content repository
+implementation and a set of transitive dependencies needed by Jackrabbit.
+See the <a href="downloads.html">Downloads</a>
+page for the latest available version.</p>
+<p>Jackrabbit uses the <a class="externalLink" href="http://www.slf4j.org/">SLF4J</a>
+for logging and leaves it up to the embedding application to decide which
+underlying logging library to use. In the example above we use the
+slf4j-log4j12 library which uses <a class="externalLink" href="http://logging.apache.org/log4j/1.2/">log4j 1.2</a>
+for handling the log messages. Note that the commons-logging dependency
+(which is a transitive dependency from <a class="externalLink" href="http://poi.apache.org/">Apache POI</a>
+) is explicitly replaced with the jcl-over-slf4j dependency that routes
+also all <a class="externalLink" href="http://commons.apache.org/logging/">Commons Logging</a>
+log messages through the selected SLF4J implementation. Jackrabbit 1.5.x
+uses SLF4J version 1.5.3.</p>
+<p>The full set of compile-scope dependencies included by the above
+declaration is shown below. If you use a build tool like <a class="externalLink" href="http://ant.apache.org/">Ant</a>
+where you need to explicitly include all dependencies, you can use this
+list to correctly configure your classpath.</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">+- javax.jcr:jcr:jar:1.0:compile
+<div class="source"><pre class="prettyprint linenums"><code>+- javax.jcr:jcr:jar:1.0:compile
 +- org.apache.jackrabbit:jackrabbit-core:jar:1.5.0:compile
 |  +- concurrent:concurrent:jar:1.3.4:compile
 |  +- commons-collections:commons-collections:jar:3.1:compile
@@ -250,14 +272,16 @@
 +- org.slf4j:jcl-over-slf4j:jar:1.5.3:compile
 \- org.slf4j:slf4j-log4j12:jar:1.5.3:compile
    \- log4j:log4j:jar:1.2.14:compile
-</pre></div></div>
-
-<p>Note that some of the transitive dependencies listed above may conflict with some other dependencies of our application. In such cases you may want to consider switching to a deployment model that uses separate class loaders for your application and the Jackrabbit content repository.</p></section><section>
+</code></pre></div>
+<p>Note that some of the transitive dependencies listed above may conflict
+with some other dependencies of our application. In such cases you may want
+to consider switching to a deployment model that uses separate class
+loaders for your application and the Jackrabbit content repository.</p></section><section>
 <h2><a name="Starting_the_repository"></a>Starting the repository</h2>
-<p>Once you have your classpath configured you can start the repository with the following piece of code.</p>
+<p>Once you have your classpath configured you can start the repository with
+the following piece of code.</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">import javax.jcr.Repository;
+<div class="source"><pre class="prettyprint linenums"><code>import javax.jcr.Repository;
 import org.apache.jackrabbit.core.RepositoryImpl;
 import org.apache.jackrabbit.core.config.RepositoryConfig;
 
@@ -265,43 +289,57 @@ String xml = &quot;/path/to/repository/c
 String dir = &quot;/path/to/repository/directory&quot;;
 RepositoryConfig config = RepositoryConfig.create(xml, dir);
 Repository repository = RepositoryImpl.create(config);
-</pre></div></div>
-
-<p>See the [Jackrabbit Configuration] page for more information on repository configuration. See the <a class="externalLink" href="http://jackrabbit.apache.org/api/1.5/org/apache/jackrabbit/core/config/RepositoryConfig.html">RepositoryConfig</a> and <a class="externalLink" href="http://jackrabbit.apache.org/api/1.5/org/apache/jackrabbit/core/RepositoryImpl.html">RepositoryImpl</a> javadocs for more details on these classes.</p></section><section>
+</code></pre></div>
+<p>See the [Jackrabbit Configuration]
+page for more information on repository configuration. See the <a class="externalLink" href="http://jackrabbit.apache.org/api/1.5/org/apache/jackrabbit/core/config/RepositoryConfig.html">RepositoryConfig</a>
+and <a class="externalLink" href="http://jackrabbit.apache.org/api/1.5/org/apache/jackrabbit/core/RepositoryImpl.html">RepositoryImpl</a>
+javadocs for more details on these classes.</p></section><section>
 <h2><a name="Shutting_down_the_repository"></a>Shutting down the repository</h2>
 <p>When your application no longer needs the content repository, you can shut it down with the following code.</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">((RepositoryImpl) repository).shutdown();
-</pre></div></div>
-
-<p>This will forcibly close all open sessions and make sure that all repository content is safely stored on disk.</p></section><section>
+<div class="source"><pre class="prettyprint linenums"><code>((RepositoryImpl) repository).shutdown();
+</code></pre></div>
+<p>This will forcibly close all open sessions and make sure that all
+repository content is safely stored on disk.</p></section><section>
 <h2><a name="The_TransientRepository_class"></a>The TransientRepository class</h2>
-<p>Jackrabbit comes with a <a class="externalLink" href="http://jackrabbit.apache.org/api/1.5/org/apache/jackrabbit/core/TransientRepository.html">TransientRepository</a> class that makes it even easier to get started with a content repository. This class is especially handy for quick prototyping, but using the RepositoryImpl class as described above gives you better control over the repository lifecycle and is typically a better alternative for production code.</p>
+<p>Jackrabbit comes with a <a class="externalLink" href="http://jackrabbit.apache.org/api/1.5/org/apache/jackrabbit/core/TransientRepository.html">TransientRepository</a>
+class that makes it even easier to get started with a content repository.
+This class is especially handy for quick prototyping, but using the
+RepositoryImpl class as described above gives you better control over the
+repository lifecycle and is typically a better alternative for production
+code.</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">import javax.jcr.Repository;
+<div class="source"><pre class="prettyprint linenums"><code>import javax.jcr.Repository;
 import org.apache.jackrabbit.core.TransientRepository;
 
 Repository repository = new TransientRepository();
-</pre></div></div>
-
-<p>This creates a repository instance that starts up when the first session is created and automatically shuts down when the last session is closed. By default the repository will be created in a &#x201c;jackrabbit&#x201d; subdirectory using a default configuration file in <code>jackrabbit/repository.xml</code>. See the TransientRepository javadocs for the ways to override these defaults.</p></section><section>
+</code></pre></div>
+<p>This creates a repository instance that starts up when the first session is
+created and automatically shuts down when the last session is closed. By
+default the repository will be created in a &#x201c;jackrabbit&#x201d; subdirectory using
+a default configuration file in <code>jackrabbit/repository.xml</code>. See the
+TransientRepository javadocs for the ways to override these defaults.</p></section><section>
 <h2><a name="Enabling_remote_access"></a>Enabling remote access</h2>
-<p>Even if you mostly use the content repository in embedded mode within your application, it may occasionally be useful to be able to access the repository for example from an external administration tool while your application is still running. You can use the jackrabbit-jcr-rmi library to make this possible. To do this, you first need to add the appropriate dependency.</p>
+<p>Even if you mostly use the content repository in embedded mode within your
+application, it may occasionally be useful to be able to access the
+repository for example from an external administration tool while your
+application is still running. You can use the jackrabbit-jcr-rmi library to
+make this possible. To do this, you first need to add the appropriate
+dependency.</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">&lt;dependency&gt;
+<div class="source"><pre class="prettyprint linenums"><code>&lt;dependency&gt;
   &lt;groupId&gt;org.apache.jackrabbit&lt;/groupId&gt;
   &lt;artifactId&gt;jackrabbit-jcr-rmi&lt;/artifactId&gt;
   &lt;version&gt;1.5.0&lt;/version&gt;
 &lt;/dependency&gt;
-</pre></div></div>
-
-<p>Make sure that you have <a class="externalLink" href="http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/rmiregistry.html">rmiregistry</a> running, and use the following code to export the repository. Note that you need to include the JCR API and the jackrabbit-jcr-rmi libraries in the rmiregistry classpath for the binding to work without extra RMI codebase settings.</p>
+</code></pre></div>
+<p>Make sure that you have <a class="externalLink" href="http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/rmiregistry.html">rmiregistry</a>
+running, and use the following code to export the repository. Note that
+you need to include the JCR API and the jackrabbit-jcr-rmi libraries in the
+rmiregistry classpath for the binding to work without extra RMI codebase
+settings.</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">import java.rmi.Naming;
+<div class="source"><pre class="prettyprint linenums"><code>import java.rmi.Naming;
 import org.apache.jackrabbit.rmi.server.RemoteAdapterFactory;
 import org.apache.jackrabbit.rmi.server.RemoteRepository;
 import org.apache.jackrabbit.rmi.jackrabbit.JackrabbitRemoteAdapterFactory;
@@ -311,51 +349,59 @@ repository
 RemoteAdapterFactory factory = new JackrabbitRemoteAdapterFactory();
 RemoteRepository remote = factory.getRemoteRepository(repository);
 Naming.bind(url, remote);
-</pre></div></div>
-
-<p>Use the following code to remote the repository binding from the RMI registry before you shutdown the repository.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">Naming.unbind(url);
-</pre></div></div>
-
-<p>You need to keep a direct reference to the RemoteRepository instance in your code until you call Naming.unbind as otherwise it could get garbage collected before a remote client connects to it.</p>
-<p>See the <a href="repository-server.html">Repository Server</a> page for instructions on how to access such a remote repository.</p></section><section>
+</code></pre></div>
+<p>Use the following code to remote the repository binding from the RMI
+registry before you shutdown the repository.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>Naming.unbind(url);
+</code></pre></div>
+<p>You need to keep a direct reference to the RemoteRepository instance in
+your code until you call Naming.unbind as otherwise it could get garbage
+collected before a remote client connects to it.</p>
+<p>See the <a href="repository-server.html">Repository Server</a>
+page for instructions on how to access such a remote repository.</p></section><section>
 <h2><a name="Embedded_repository_in_a_web_application"></a>Embedded repository in a web application</h2>
-<p>If your want to embed Jackrabbit in a web application, you can use the classes in the jackrabbit-jcr-servlet library to avoid the above startup and shutdown code. To do this, you first need to include jackrabbit-jcr-servlet as a dependency.</p>
+<p>If your want to embed Jackrabbit in a web application, you can use the
+classes in the jackrabbit-jcr-servlet library to avoid the above startup
+and shutdown code. To do this, you first need to include
+jackrabbit-jcr-servlet as a dependency.</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">&lt;dependency&gt;
+<div class="source"><pre class="prettyprint linenums"><code>&lt;dependency&gt;
   &lt;groupId&gt;org.apache.jackrabbit&lt;/groupId&gt;
   &lt;artifactId&gt;jackrabbit-jcr-servlet&lt;/artifactId&gt;
   &lt;version&gt;1.5.0&lt;/version&gt;
 &lt;/dependency&gt;
-</pre></div></div>
-
-<p>Then you can instruct the servlet container to automatically start and stop the repository as a part of your webapp lifecycle by including the following servlet configuration in your web.xml file.</p>
+</code></pre></div>
+<p>Then you can instruct the servlet container to automatically start and stop
+the repository as a part of your webapp lifecycle by including the
+following servlet configuration in your web.xml file.</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">&lt;servlet&gt;
+<div class="source"><pre class="prettyprint linenums"><code>&lt;servlet&gt;
     &lt;servlet-name&gt;ContentRepository&lt;/servlet-name&gt;
     &lt;servlet-class&gt;org.apache.jackrabbit.servlet.jackrabbit.JackrabbitRepositoryServlet&lt;/servlet-class&gt;
     &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
 &lt;/servlet&gt;
-</pre></div></div>
+</code></pre></div>
+<p>See the <a class="externalLink" href="http://jackrabbit.apache.org/api/1.5/org/apache/jackrabbit/servlet/jackrabbit/JackrabbitRepositoryServlet.html">JackrabbitRepositoryServlet</a>
+javadocs for the available configuration options.</p>
+<p>You can then access the repository in your own servlet classes using the
+following piece of code without worrying about the repository lifecycle.</p>
 
-<p>See the <a class="externalLink" href="http://jackrabbit.apache.org/api/1.5/org/apache/jackrabbit/servlet/jackrabbit/JackrabbitRepositoryServlet.html">JackrabbitRepositoryServlet</a> javadocs for the available configuration options.</p>
-<p>You can then access the repository in your own servlet classes using the following piece of code without worrying about the repository lifecycle.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">import javax.jcr.Repository;
+<div class="source"><pre class="prettyprint linenums"><code>import javax.jcr.Repository;
 import org.apache.jackrabbit.servlet.ServletRepository;
-</pre></div></div>
-
-<p>Repository repository = new ServletRepository(this); // &#x201c;this&#x201d; is the containing servlet</p>
-<p>The benefit of this approach over directly using the RepositoryImpl or TransientRepository classes as described above is that you can later on switch to a different deployment model without any code changes simply by modifying the servlet configuration in your web.xml.</p>
-<p>With this approach it is also easier to make your repository remotely available. Add the following configuration to your web.xml and your repository is automatically made available as a remote repository at &#x2026;/rmi in the URL space of your webapp.</p>
+</code></pre></div>
+<p>Repository repository = new ServletRepository(this); // &#x201c;this&#x201d; is the
+containing servlet</p>
+<p>The benefit of this approach over directly using the RepositoryImpl or
+TransientRepository classes as described above is that you can later on
+switch to a different deployment model without any code changes simply by
+modifying the servlet configuration in your web.xml.</p>
+<p>With this approach it is also easier to make your repository remotely
+available. Add the following configuration to your web.xml and your
+repository is automatically made available as a remote repository at
+&#x2026;/rmi in the URL space of your webapp.</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">&lt;servlet&gt;
+<div class="source"><pre class="prettyprint linenums"><code>&lt;servlet&gt;
     &lt;servlet-name&gt;RemoteRepository&lt;/servlet-name&gt;
     &lt;servlet-class&gt;org.apache.jackrabbit.servlet.remote.RemoteBindingServlet&lt;/servlet-class&gt;
 &lt;/servlet&gt;
@@ -363,9 +409,9 @@ import org.apache.jackrabbit.servlet.Ser
     &lt;servlet-name&gt;RemoteRepository&lt;/servlet-name&gt;
     &lt;url-pattern&gt;/rmi&lt;/url-pattern&gt;
 &lt;/servlet-mapping&gt;
-</pre></div></div>
-
-<p>Note that you also need the jackrabbit-jcr-rmi dependency in your application for the above configuration to work.</p></section>
+</code></pre></div>
+<p>Note that you also need the jackrabbit-jcr-rmi dependency in your
+application for the above configuration to work.</p></section>
         </main>
       </div>
     </div>
@@ -377,10 +423,12 @@ import org.apache.jackrabbit.servlet.Ser
 <a href="https://www.apache.org/">The Apache Software Foundation</a> &vert; <a href="https://privacy.apache.org/policies/privacy-policy-public.html">Privacy Policy</a>
 </p>
         </div>
-    <div id="ohloh" class="pull-right">
-      <script src="https://www.ohloh.net/p/jackrabbit/widgets/project_users_logo.js"></script>
-    </div>
-        </div>
+      </div>
     </footer>
+<script>
+	if(anchors) {
+	  anchors.add();
+	}
+</script>
   </body>
 </html>
\ No newline at end of file

Modified: jackrabbit/site/live/jcr/first-hops.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/jcr/first-hops.html?rev=1902520&r1=1902519&r2=1902520&view=diff
==============================================================================
--- jackrabbit/site/live/jcr/first-hops.html (original)
+++ jackrabbit/site/live/jcr/first-hops.html Thu Jul  7 09:59:50 2022
@@ -1,42 +1,40 @@
 <!DOCTYPE html>
+
+
 <!--
- | Generated by Apache Maven Doxia Site Renderer 1.9.2 from src\site\markdown/first-hops.md at 2022-05-09
- | Rendered using Apache Maven Fluido Skin 1.9
+ | Generated by Apache Maven Doxia Site Renderer 1.11.1 from src\site\markdown/first-hops.md at 2022-07-07
+ | Rendered using Apache Maven Fluido Skin 1.11.1
 -->
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en">
   <head>
     <meta charset="UTF-8" />
     <meta name="viewport" content="width=device-width, initial-scale=1" />
-    <meta name="generator" content="Apache Maven Doxia Site Renderer 1.9.2" />
+    <meta name="generator" content="Apache Maven Doxia Site Renderer 1.11.1" />
     <title>Apache Jackrabbit &#x2013; First Hops</title>
-    <link rel="stylesheet" href="./css/apache-maven-fluido-1.9.min.css" />
+    <link rel="stylesheet" href="./css/apache-maven-fluido-1.11.1.min.css" />
     <link rel="stylesheet" href="./css/site.css" />
     <link rel="stylesheet" href="./css/print.css" media="print" />
-    <script src="./js/apache-maven-fluido-1.9.min.js"></script>
-<!-- Matomo -->
-<script>
-  var _paq = window._paq = window._paq || [];
-  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
-  /* We explicitly disable cookie tracking to avoid privacy issues */
-  _paq.push(['disableCookies']);
-  _paq.push(['trackPageView']);
-  _paq.push(['enableLinkTracking']);
-  (function() {
-    var u="https://matomo.privacy.apache.org/";
-    _paq.push(['setTrackerUrl', u+'matomo.php']);
-    _paq.push(['setSiteId', '4']);
-    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
-    g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
-  })();
-</script>
-<!-- End Matomo Code -->
+    <script src="./js/apache-maven-fluido-1.11.1.min.js"></script>
+
+    <!-- Matomo -->
+    <script>
+        var _paq = window._paq = window._paq || [];
+                _paq.push(['disableCookies']);
+                    _paq.push(['trackPageView']);
+                    _paq.push(['enableLinkTracking']);
+        
+        (function() {
+            var u="https://analytics.apache.org";
+            _paq.push(['setTrackerUrl', u+'/matomo.php']);
+            _paq.push(['setSiteId', '4']);
+            var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
+            g.async=true; g.src=u+'/matomo.js'; s.parentNode.insertBefore(g,s);
+        })();
+    </script>
+    <!-- End Matomo Code -->
   </head>
   <body class="topBarEnabled">
-    <a href="https://github.com/apache/jackrabbit">
-      <img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;"
-        src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"
-        alt="Fork me on GitHub">
-    </a>
+    <a class="github-fork-ribbon right-top" href="https://github.com/apache/jackrabbit" data-ribbon="Fork me on GitHub" title="Fork me on GitHub">Fork me on GitHub</a>
     <header id="topbar" class="navbar navbar-fixed-top ">
       <div class="navbar-inner">
         <div class="container-fluid">
@@ -49,7 +47,7 @@
 </a>
             <ul class="nav">
       <li class="dropdown">
-        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache Jackrabbit <b class="caret"></b></a>
+        <a class="dropdown-toggle" data-toggle="dropdown">Apache Jackrabbit <b class="caret"></b></a>
         <ul class="dropdown-menu">
             <li><a href="index.html" title="Welcome">Welcome</a></li>
             <li><a href="downloads.html" title="Downloads">Downloads</a></li>
@@ -60,12 +58,12 @@
         </ul>
       </li>
       <li class="dropdown">
-        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Documentation <b class="caret"></b></a>
+        <a class="dropdown-toggle" data-toggle="dropdown">Documentation <b class="caret"></b></a>
         <ul class="dropdown-menu">
             <li><a href="getting-started-with-apache-jackrabbit.html" title="Getting Started">Getting Started</a></li>
             <li><a href="standalone-server.html" title="Standalone Server">Standalone Server</a></li>
             <li><a href="jackrabbit-components.html" title="Jackrabbit Components">Jackrabbit Components</a></li>
-            <li><a href="first-hops.html" title="First Hops">First Hops</a></li>
+            <li><a title="First Hops">First Hops</a></li>
             <li><a href="jcr-api.html" title="JCR & API">JCR & API</a></li>
             <li><a href="jackrabbit-architecture.html" title="Jackrabbit Architecture">Jackrabbit Architecture</a></li>
             <li><a href="deployment-models.html" title="Deployment Models">Deployment Models</a></li>
@@ -75,7 +73,7 @@
         </ul>
       </li>
       <li class="dropdown">
-        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Development <b class="caret"></b></a>
+        <a class="dropdown-toggle" data-toggle="dropdown">Development <b class="caret"></b></a>
         <ul class="dropdown-menu">
             <li><a href="jackrabbit-team.html" title="Jackrabbit Team">Jackrabbit Team</a></li>
             <li><a href="jackrabbit-roadmap.html" title="Jackrabbit Roadmap">Jackrabbit Roadmap</a></li>
@@ -90,7 +88,7 @@
         </ul>
       </li>
       <li class="dropdown">
-        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache Software Foundation <b class="caret"></b></a>
+        <a class="dropdown-toggle" data-toggle="dropdown">Apache Software Foundation <b class="caret"></b></a>
         <ul class="dropdown-menu">
             <li><a href="https://www.apache.org/foundation/how-it-works.html" title="Introduction">Introduction</a></li>
             <li><a href="https://www.apache.org/foundation/sponsorship.html" title="Sponsorship">Sponsorship</a></li>
@@ -105,7 +103,7 @@
     <div class="container-fluid">
       <header>
         <div id="banner">
-          <div class="pull-left"><div id="bannerLeft"><h2>Apache Jackrabbit Site</h2>
+          <div class="pull-left"><div id="bannerLeft"><h1>Apache Jackrabbit Site</h1>
 </div>
 </div>
           <div class="pull-right"></div>
@@ -114,7 +112,7 @@
 
         <div id="breadcrumbs">
           <ul class="breadcrumb">
-        <li id="publishDate">Last Published: 2022-05-09</li>
+        <li id="publishDate">Last Published: 2022-07-07</li>
           </ul>
         </div>
       </header>
@@ -133,7 +131,7 @@
     <li><a href="getting-started-with-apache-jackrabbit.html" title="Getting Started"><span class="none"></span>Getting Started</a></li>
     <li><a href="standalone-server.html" title="Standalone Server"><span class="none"></span>Standalone Server</a></li>
     <li><a href="jackrabbit-components.html" title="Jackrabbit Components"><span class="none"></span>Jackrabbit Components</a></li>
-    <li class="active"><a href="#"><span class="none"></span>First Hops</a></li>
+    <li class="active"><a><span class="none"></span>First Hops</a></li>
     <li><a href="jcr-api.html" title="JCR & API"><span class="none"></span>JCR & API</a></li>
     <li><a href="jackrabbit-architecture.html" title="Jackrabbit Architecture"><span class="none"></span>Jackrabbit Architecture</a></li>
     <li><a href="deployment-models.html" title="Deployment Models"><span class="none"></span>Deployment Models</a></li>
@@ -159,7 +157,6 @@
   </ul>
           </nav>
           <div class="well sidebar-nav">
-            <hr />
             <div id="poweredBy">
               <div class="clear"></div>
               <div class="clear"></div>
@@ -186,12 +183,20 @@
    limitations under the License.
 -->
 <h1>First Hops</h1>
-<p>Welcome to your first hops into the world of Jackrabbit! This introduction gives you a hands-on experience with Jackrabbit and the JCR API. Once you have finished hopping through this document, you should be all set to continue on your own with the official JCR specification and the documentation on this site.</p><section>
+<p>Welcome to your first hops into the world of Jackrabbit! This introduction
+gives you a hands-on experience with Jackrabbit and the JCR API. Once you
+have finished hopping through this document, you should be all set to
+continue on your own with the official JCR specification and the
+documentation on this site.</p><section>
 <h2><a name="Hop_0:_Getting_started"></a>Hop 0: Getting started</h2>
-<p>The easiest way to get started with Jackrabbit is to <a href="downloads.html">download</a> the runnable <a href="standalone-server.html">Standalone Server</a> jar. In addition to running it, you can also put it in your classpath to quickly access all the classes and interfaces you need below. Alternatively, if you use the <a class="externalLink" href="http://maven.apache.org/">Apache Maven</a> build system (which we recommend), you can set up your first hops project with the following dependencies.</p>
+<p>The easiest way to get started with Jackrabbit is to <a href="downloads.html">download</a>
+the runnable <a href="standalone-server.html">Standalone Server</a> jar. In addition to
+running it, you can also put it in your classpath to quickly access all the classes
+and interfaces you need below. Alternatively, if you use the <a class="externalLink" href="http://maven.apache.org/">Apache Maven</a>
+build system (which we recommend), you can set up your first hops project
+with the following dependencies.</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">&lt;dependencies&gt; 
+<div class="source"><pre class="prettyprint linenums"><code>&lt;dependencies&gt; 
     &lt;!-- The JCR API --&gt; 
     &lt;dependency&gt; 
         &lt;groupId&gt;javax.jcr&lt;/groupId&gt; 
@@ -213,14 +218,17 @@
         &lt;version&gt;1.5.11&lt;/version&gt; 
     &lt;/dependency&gt; 
 &lt;/dependencies&gt; 
-</pre></div></div>
-
-<p>You probably have an error in your classpath settings if you get a <code>ClassNotFoundException</code> message when trying to compile or run the examples below.</p></section><section>
+</code></pre></div>
+<p>You probably have an error in your classpath settings if you get a
+<code>ClassNotFoundException</code> message when trying to compile or run the
+examples below.</p></section><section>
 <h2><a name="Hop_1:_Logging_in_to_Jackrabbit"></a>Hop 1: Logging in to Jackrabbit</h2>
-<p>So let&#x2019;s get started. As a warm-up we&#x2019;ll create a Jackrabbit content repository and start a login session for accessing it. The full example application that does this is shown below, with line-by-line explanations following shortly after.</p>
+<p>So let's get started. As a warm-up we'll create a Jackrabbit content
+repository and start a login session for accessing it. The full example
+application that does this is shown below, with line-by-line explanations
+following shortly after.</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">import javax.jcr.GuestCredentials;
+<div class="source"><pre class="prettyprint linenums"><code>import javax.jcr.GuestCredentials;
 import javax.jcr.Repository;
 import javax.jcr.Session; 
 import org.apache.jackrabbit.commons.JcrUtils;
@@ -250,77 +258,120 @@ public class FirstHop {
         } 
     } 
 } 
-</pre></div></div>
-
-<p>You can also download the source file as <code>FirstHop.java</code>. If you have your classpath set up, you can compile the application with javac <code>FirstHop.java</code> and run it with java FirstHop to get the following output.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">Logged in as anonymous to a Jackrabbit repository. 
-</pre></div></div>
-
-<p>In addition to producing the above status line the application copies a default repository configuration file to <code>repository.xml</code> and creates an initial Jackrabbit content repository in the <code>jackrabbit</code> subdirectory. You can use the system properties <code>org.apache.jackrabbit.repository.conf</code> and <code>org.apache.jackrabbit.repository.home</code> to set alternative configuration file and repository directory locations.</p>
+</code></pre></div>
+<p>You can also download the source file as <code>FirstHop.java</code>. If you have your
+classpath set up, you can compile the application with javac <code>FirstHop.java</code>
+and run it with java FirstHop to get the following output.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>Logged in as anonymous to a Jackrabbit repository. 
+</code></pre></div>
+<p>In addition to producing the above status line the application copies a
+default repository configuration file to <code>repository.xml</code> and creates an
+initial Jackrabbit content repository in the <code>jackrabbit</code> subdirectory. You
+can use the system properties <code>org.apache.jackrabbit.repository.conf</code> and
+<code>org.apache.jackrabbit.repository.home</code> to set alternative configuration
+file and repository directory locations.</p>
 <p>Read on for a detailed breakdown of the FirstHop application:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">import javax.jcr.Repository; 
+<div class="source"><pre class="prettyprint linenums"><code>import javax.jcr.Repository; 
 import javax.jcr.Session; 
-</pre></div></div>
-
-<p>The JCR API interfaces are located in the javax.jcr package found in the jcr-2.0.jar library. The promise of the JCR API is that if you only use these interfaces in your content application, it should remain mostly independent of the underlying content repository implementation.</p>
-<p>The <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Repository.html?is-external=true">Repository</a> interface represents a given content repository instance and the <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Session.html?is-external=true">Session</a> interface represents a single login session for accessing the repository. A session is needed to access any content within a repository.</p>
-<p>Note that a Session instance is not guaranteed to be thread-safe so you should start multiple sessions if you need to access repository content simultaneously from different threads. This is especially important for things like web applications.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">import org.apache.jackrabbit.commons.JcrUtils;
-</pre></div></div>
+</code></pre></div>
+<p>The JCR API interfaces are located in the javax.jcr package found in the
+jcr-2.0.jar library. The promise of the JCR API is that if you only use
+these interfaces in your content application, it should remain mostly
+independent of the underlying content repository implementation.</p>
+<p>The <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Repository.html?is-external=true">Repository</a>
+interface represents a given content repository instance and the <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Session.html?is-external=true">Session</a>
+interface represents a single login session for accessing the repository.
+A session is needed to access any content within a repository.</p>
+<p>Note that a Session instance is not guaranteed to be thread-safe so you
+should start multiple sessions if you need to access repository content
+simultaneously from different threads. This is especially important for
+things like web applications.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>import org.apache.jackrabbit.commons.JcrUtils;
+</code></pre></div>
+<p>The best practice for deploying Jackrabbit is to use JNDI or some other
+configuration mechanism in a container environment to keep the application
+code free of direct Jackrabbit dependencies, but since we are creating a
+simple standalone application we can take a shortcut by using the <a class="externalLink" href="http://jackrabbit.apache.org/api/2.10/org/apache/jackrabbit/commons/JcrUtils.html">JcrUtils</a>
+class from Jackrabbit commons.</p>
 
-<p>The best practice for deploying Jackrabbit is to use JNDI or some other configuration mechanism in a container environment to keep the application code free of direct Jackrabbit dependencies, but since we are creating a simple standalone application we can take a shortcut by using the <a class="externalLink" href="http://jackrabbit.apache.org/api/2.10/org/apache/jackrabbit/commons/JcrUtils.html">JcrUtils</a> class from Jackrabbit commons.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">public class FirstHop 
+<div class="source"><pre class="prettyprint linenums"><code>public class FirstHop 
 public static void main(String[] args) throws Exception 
-</pre></div></div>
-
-<p>The FirstHop example is a simple standalone application that fits nicely in the <code>main()</code> method and lets the JVM take care of the possible exceptions. More substantial content applications could also be written as web application or EJB components with different setup and error handling patterns.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">Repository repository = JcrUtils.getRepository();
-</pre></div></div>
-
-<p>The <code>JcrUtils.getRepository()</code> method returns an object that implements the JCR Repository interface. The actual implementation depends on the jar files available on the classpath and in this example is a <a class="externalLink" href="http://jackrabbit.apache.org/api/2.10/org/apache/jackrabbit/core/TransientRepository.html">TransientRepository</a>. The implementation contains a utility feature that will take care of the initial configuration and repository construction when the first session is started. Thus there is no need for manual configuration for now unless you want direct control over the repository setup.</p>
-<p>The <code>TransientRepository</code> implementation will automatically initialize the content repository when the first session is started and shut it down when the last session is closed. Thus there is no need for explicit repository shutdown as long as all sessions are properly closed. Note that a Jackrabbit repository directory contains a lock file that prevents it from being accessed simultaneously by multiple processes. You will see repository startup exceptions caused by the lock file if you fail to properly close all sessions or otherwise shut down the repository before leaving the process that accesses a repository. Normally you can just manually remove the lock file in such cases but such cases always present a chance of repository corruption especially if you use a non-transactional persistence manager.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">Session session = repository.login(new GuestCredentials());
-</pre></div></div>
-
-<p>The <code>Repository.login(Credentials)</code> method starts a repository session using the default workspace and some user credentials. The FirstHop example uses <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/GuestCredentials.html?is-external=true">GuestCredentials</a> and Jackrabbit maps it to the read-only anonymous user.</p>
-<p>Since we use the <code>TransientRepository</code> class as the Repository implementation, this step will also cause the repository to be initialized.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">try { ... } finally { session.logout(); } 
-</pre></div></div>
-
-<p>It is a good practice to properly release all acquired resources, and the JCR sessions are no exception. The try-finally idiom is a good way to ensure that a resource really gets released, as the release method gets called even if the intervening code throws an exception or otherwise jumps outside the scope (for example using a return, break, or continue statement).</p>
-<p>The <code>Session.logout()</code> method in the finally branch closes the session and since this is the only session we have started, the TransientRepository is automatically shut down.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">String user = session.getUserID(); 
-</pre></div></div>
-
-<p>The username or identifier of the user associated with a session is available using the <code>Session.getUserID()</code> method. Jackrabbit returns <code>&quot;anonymous&quot;</code> by default.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">String name = repository.getDescriptor(Repository.REP_NAME_DESC); 
-</pre></div></div>
-
-<p>Each content repository implementation publishes a number of string descriptors that describe the various implementation properties, like the implementation level and the supported optional JCR features. See the <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Repository.html?is-external=true">Repository</a> interface for a list of the standard repository descriptors. The <code>REP_NAME_DESC</code> descriptor contains the name of the repository implementation, in this case <code>&quot;Jackrabbit&quot;</code>.</p></section><section>
+</code></pre></div>
+<p>The FirstHop example is a simple standalone application that fits nicely in
+the <code>main()</code> method and lets the JVM take care of the possible exceptions.
+More substantial content applications could also be written as web
+application or EJB components with different setup and error handling
+patterns.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>Repository repository = JcrUtils.getRepository();
+</code></pre></div>
+<p>The <code>JcrUtils.getRepository()</code> method returns an object that implements the
+JCR Repository interface. The actual implementation depends on the jar files
+available on the classpath and in this example is a <a class="externalLink" href="http://jackrabbit.apache.org/api/2.10/org/apache/jackrabbit/core/TransientRepository.html">TransientRepository</a>.
+The implementation contains a utility feature that will take
+care of the initial configuration and repository construction when the
+first session is started. Thus there is no need for manual configuration
+for now unless you want direct control over the repository setup.</p>
+<p>The <code>TransientRepository</code> implementation will automatically initialize the
+content repository when the first session is started and shut it down when
+the last session is closed. Thus there is no need for explicit repository
+shutdown as long as all sessions are properly closed. Note that a
+Jackrabbit repository directory contains a lock file that prevents it from
+being accessed simultaneously by multiple processes. You will see
+repository startup exceptions caused by the lock file if you fail to
+properly close all sessions or otherwise shut down the repository before
+leaving the process that accesses a repository. Normally you can just
+manually remove the lock file in such cases but such cases always present a
+chance of repository corruption especially if you use a non-transactional
+persistence manager.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>Session session = repository.login(new GuestCredentials());
+</code></pre></div>
+<p>The <code>Repository.login(Credentials)</code> method starts a repository session using the
+default workspace and some user credentials. The FirstHop example uses <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/GuestCredentials.html?is-external=true">GuestCredentials</a>
+and Jackrabbit maps it to the read-only anonymous user.</p>
+<p>Since we use the <code>TransientRepository</code> class as the Repository
+implementation, this step will also cause the repository to be initialized.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>try { ... } finally { session.logout(); } 
+</code></pre></div>
+<p>It is a good practice to properly release all acquired resources, and the
+JCR sessions are no exception. The try-finally idiom is a good way to
+ensure that a resource really gets released, as the release method gets
+called even if the intervening code throws an exception or otherwise jumps
+outside the scope (for example using a return, break, or continue
+statement).</p>
+<p>The <code>Session.logout()</code> method in the finally branch closes the session and
+since this is the only session we have started, the TransientRepository is
+automatically shut down.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>String user = session.getUserID(); 
+</code></pre></div>
+<p>The username or identifier of the user associated with a session is
+available using the <code>Session.getUserID()</code> method. Jackrabbit returns
+<code>&quot;anonymous&quot;</code> by default.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>String name = repository.getDescriptor(Repository.REP_NAME_DESC); 
+</code></pre></div>
+<p>Each content repository implementation publishes a number of string
+descriptors that describe the various implementation properties, like the
+implementation level and the supported optional JCR features. See the <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Repository.html?is-external=true">Repository</a>
+interface for a list of the standard repository descriptors. The
+<code>REP_NAME_DESC</code> descriptor contains the name of the repository
+implementation, in this case <code>&quot;Jackrabbit&quot;</code>.</p></section><section>
 <h2><a name="Hop_2:_Working_with_content"></a>Hop 2: Working with content</h2>
-<p>The main function of a content repository is allow applications to store and retrieve content. The content in a JCR content repository consists of structured or unstructured data modeled as a hierarchy of nodes with properties that contain the actual data.</p>
-<p>The following example application first stores some content to the initially empty content repository, then retrieves the stored content and outputs it, and finally removes the stored content.</p>
+<p>The main function of a content repository is allow applications to store
+and retrieve content. The content in a JCR content repository consists of
+structured or unstructured data modeled as a hierarchy of nodes with
+properties that contain the actual data.</p>
+<p>The following example application first stores some content to the
+initially empty content repository, then retrieves the stored content and
+outputs it, and finally removes the stored content.</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">import javax.jcr.Repository; 
+<div class="source"><pre class="prettyprint linenums"><code>import javax.jcr.Repository; 
 import javax.jcr.Session; 
 import javax.jcr.SimpleCredentials; 
 import javax.jcr.Node; 
@@ -364,101 +415,153 @@ public class SecondHop {
     } 
     
 } 
-</pre></div></div>
+</code></pre></div>
+<p>Like in the first hop, this example source is also available as
+SecondHop.java. You can also compile and run this class just like you did
+in the first hop example. Running this example should produce the following
+output:</p>
 
-<p>Like in the first hop, this example source is also available as SecondHop.java. You can also compile and run this class just like you did in the first hop example. Running this example should produce the following output:</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">/hello/world 
+<div class="source"><pre class="prettyprint linenums"><code>/hello/world 
 Hello, World! 
-</pre></div></div>
-
-<p>The basic structure of this example application is the same as in the First Hop example, so let&#x2019;s just walk through the differences:</p>
+</code></pre></div>
+<p>The basic structure of this example application is the same as in the First
+Hop example, so let's just walk through the differences:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">import javax.jcr.SimpleCredentials; 
+<div class="source"><pre class="prettyprint linenums"><code>import javax.jcr.SimpleCredentials; 
 import javax.jcr.Node; 
-</pre></div></div>
-
-<p>These are two new classes we need for this example. The <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/SimpleCredentials.html?is-external=true">SimpleCredentials</a> class is a simple implementation of the <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Credentials.html?is-external=true">Credentials</a> interface used for passing explicit user credentials to the <code>Repository.login(Credentials)</code> method.</p>
-<p>The <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Node.html?is-external=true">Node</a> interface is used to manage the content nodes in a repository. There is a related interface called <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Property.html?is-external=true">Property</a> for managing content properties, but in this example we use the Property interface only indirectly.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">new SimpleCredentials(&quot;admin&quot;, &quot;admin&quot;.toCharArray())
-</pre></div></div>
-
-<p>As discussed in the First Hop example, a login with <code>GuestCredentials</code> returns an anonymous read-only session in the Jackrabbit default configuration. To be able to store and remove content we need to create a session with write access, and to do that we need to pass credentials with a username and password to the</p>
+</code></pre></div>
+<p>These are two new classes we need for this example. The <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/SimpleCredentials.html?is-external=true">SimpleCredentials</a>
+class is a simple implementation of the <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Credentials.html?is-external=true">Credentials</a>
+interface used for passing explicit user credentials to the
+<code>Repository.login(Credentials)</code> method.</p>
+<p>The <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Node.html?is-external=true">Node</a>
+interface is used to manage the content nodes in a repository. There is a
+related interface called <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Property.html?is-external=true">Property</a>
+for managing content properties, but in this example we use the Property
+interface only indirectly.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>new SimpleCredentials(&quot;admin&quot;, &quot;admin&quot;.toCharArray())
+</code></pre></div>
+<p>As discussed in the First Hop example, a login with <code>GuestCredentials</code>
+returns an anonymous read-only session in the Jackrabbit default
+configuration. To be able to store and remove content we need to create a
+session with write access, and to do that we need to pass credentials with
+a username and password to the</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>Repository.login(Credentials credentials) method. 
+</code></pre></div>
+<p>The default Jackrabbit login mechanism accepts only username and password as
+valid credentials for known users. A Jackrabbit repository with a default
+configuration will create an admin user when it is first initialized. Thus we
+need to construct and use a SimpleCredentials instance with the username and
+initial default password of the admin user, in this case <code>&quot;admin&quot;</code> and <code>&quot;admin&quot;</code>.</p>
+<p>The SimpleCredentials constructor follows the JAAS convention of
+representing the username as a normal String, but the password as a
+character array, so we need to use the <code>String.toCharArray()</code> method to
+satisfy the constructor.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>Node root = session.getRootNode(); 
+</code></pre></div>
+<p>Each JCR session is associated with a workspace that contains a single node
+tree. A simple way to access the root node is to call the
+<code>Session.getRootNode()</code> method. Having a reference to the root node allows us
+to easily store and retrieve content in the current workspace.</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">Repository.login(Credentials credentials) method. 
-</pre></div></div>
-
-<p>The default Jackrabbit login mechanism accepts only username and password as valid credentials for known users. A Jackrabbit repository with a default configuration will create an admin user when it is first initialized. Thus we need to construct and use a SimpleCredentials instance with the username and initial default password of the admin user, in this case <code>&quot;admin&quot;</code> and <code>&quot;admin&quot;</code>.</p>
-<p>The SimpleCredentials constructor follows the JAAS convention of representing the username as a normal String, but the password as a character array, so we need to use the <code>String.toCharArray()</code> method to satisfy the constructor.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">Node root = session.getRootNode(); 
-</pre></div></div>
-
-<p>Each JCR session is associated with a workspace that contains a single node tree. A simple way to access the root node is to call the <code>Session.getRootNode()</code> method. Having a reference to the root node allows us to easily store and retrieve content in the current workspace.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">Node hello = root.addNode(&quot;hello&quot;); 
+<div class="source"><pre class="prettyprint linenums"><code>Node hello = root.addNode(&quot;hello&quot;); 
 Node world = hello.addNode(&quot;world&quot;); 
-</pre></div></div>
-
-<p>New content nodes can be added using the <code>Node.addNode(String relPath)</code> method. The method takes the name (or relative path) of the node to be added and creates the named node in the transient storage associated with the current session. Until the transient storage is persisted, the added node is only visible within the current session and not within any other session that is concurrently accessing the content repository.</p>
-<p>This code snippet creates two new nodes, called <code>&quot;hello&quot;</code> and <code>&quot;world&quot;</code>, with <code>&quot;hello&quot;</code> being a child of the root node and <code>&quot;world&quot;</code> a child of the <code>&quot;hello&quot;</code> node.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">world.setProperty(&quot;message&quot;, &quot;Hello, World!&quot;); 
-</pre></div></div>
-
-<p>To add some content to the structure created using the <code>&quot;hello&quot;</code> and <code>&quot;world&quot;</code> nodes, we use the <code>Node.setProperty(String name, String value)</code> method to add a string property called <code>&quot;message&quot;</code> to the <code>&quot;world&quot;</code> node. The value of the property is the string <code>&quot;Hello, World!&quot;</code>.</p>
-<p>Like the added nodes, also the property is first created in the transient storage associated with the current session. If the named property already exists, then this method will change the value of that property.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">session.save(); 
-</pre></div></div>
-
-<p>Even though the rest of our example would work just fine using only the transient storage of the single session, we&#x2019;d like to persist the changes we&#x2019;ve made so far. This way other sessions could also access the example content we just created. If you like, you could even split the example application into three pieces for respectively storing, retrieving, and removing the example content. Such a split would not work unless we persisted the changes we make.</p>
-<p>The <code>Session.save()</code> method persists all pending changes in the transient storage. The changes are written to the persistent repository storage and they become visible to all sessions accessing the same workspace. Without this call all changes will be lost forever when the session is closed.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">Node node = root.getNode(&quot;hello/world&quot;); 
-</pre></div></div>
-
-<p>Since we are still using the same session, we could use the existing hello and world node references to access the stored content, but let&#x2019;s pretend that we&#x2019;ve started another session and want to retrieve the content that was previously stored.</p>
-<p>The <code>Node.getNode(String relPath)</code> method returns a reference to the node at the given path relative to this node. The path syntax follows common file system conventions: a forward slash separates node names, a single dot represents the current node, and a double dot the parent node. Thus the path <code>&quot;hello/world&quot;</code> identifies the <code>&quot;world&quot;</code> child node of the <code>&quot;hello&quot;</code> child node of the current node - in this case the root node. The end result is that the method returns a node instance that represents the same content node as the world instance created a few lines earlier.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">System.out.println(node.getPath()); 
-</pre></div></div>
-
-<p>Each content node and property is uniquely identified by its absolute path within the workspace. The absolute path starts with a forward slash and contains all the names of the ancestor nodes in order before the name of the current node or property.</p>
-<p>The path of a node or property can be retrieved using the Item.getPath() method. The <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Item.html?is-external=true">Item</a> interface is a superinterface of Node and Property, and contains all the functionality shared by nodes and properties.</p>
-<p>The node variable references the <code>&quot;world&quot;</code> node, so this statement will output the line <code>&quot;/hello/world&quot;</code>.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">System.out.println(node.getProperty(&quot;message&quot;).getString()); 
-</pre></div></div>
-
-<p>Properties can be accessed using the <code>Node.getProperty(String relPath)</code> method that returns an instance of the <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Property.html?is-external=true">Property</a> interface that represents the property at the given path relative to the current node. In this case the &#x201c;message&#x201d; property is the one we created a few lines earlier.</p>
-<p>A JCR property can contain either a single or multiple values of a given type. There are property types for storing strings, numbers, dates, binary streams, node references, etc. We just want the single string value, so we use the <code>Property.getString()</code> method. The result of this statement is the line <code>&quot;Hello, World!&quot;</code> being outputted.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">root.getNode(&quot;hello&quot;).remove(); 
-</pre></div></div>
-
-<p>Nodes and properties can be removed using the<code>Item.remove()</code> method. The method removes the entire content subtree, so we only need to remove the topmost <code>&quot;hello&quot;</code> node to get rid of all the content we added before.</p>
-<p>Removals are first stored in the session-local transient storage, just like added and changed content. Like before, the transient changes need to be explicitly saved for the content to be removed from the persistent storage.</p></section><section>
+</code></pre></div>
+<p>New content nodes can be added using the <code>Node.addNode(String relPath)</code>
+method. The method takes the name (or relative path) of the node to be
+added and creates the named node in the transient storage associated with
+the current session. Until the transient storage is persisted, the added
+node is only visible within the current session and not within any other
+session that is concurrently accessing the content repository.</p>
+<p>This code snippet creates two new nodes, called <code>&quot;hello&quot;</code> and <code>&quot;world&quot;</code>, with
+<code>&quot;hello&quot;</code> being a child of the root node and <code>&quot;world&quot;</code> a child of the <code>&quot;hello&quot;</code>
+node.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>world.setProperty(&quot;message&quot;, &quot;Hello, World!&quot;); 
+</code></pre></div>
+<p>To add some content to the structure created using the <code>&quot;hello&quot;</code> and <code>&quot;world&quot;</code>
+nodes, we use the <code>Node.setProperty(String name, String value)</code> method to add
+a string property called <code>&quot;message&quot;</code> to the <code>&quot;world&quot;</code> node. The value of the
+property is the string <code>&quot;Hello, World!&quot;</code>.</p>
+<p>Like the added nodes, also the property is first created in the transient
+storage associated with the current session. If the named property already
+exists, then this method will change the value of that property.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>session.save(); 
+</code></pre></div>
+<p>Even though the rest of our example would work just fine using only the
+transient storage of the single session, we'd like to persist the changes
+we've made so far. This way other sessions could also access the example
+content we just created. If you like, you could even split the example
+application into three pieces for respectively storing, retrieving, and
+removing the example content. Such a split would not work unless we
+persisted the changes we make.</p>
+<p>The <code>Session.save()</code> method persists all pending changes in the transient
+storage. The changes are written to the persistent repository storage and
+they become visible to all sessions accessing the same workspace. Without
+this call all changes will be lost forever when the session is closed.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>Node node = root.getNode(&quot;hello/world&quot;); 
+</code></pre></div>
+<p>Since we are still using the same session, we could use the existing hello
+and world node references to access the stored content, but let's pretend
+that we've started another session and want to retrieve the content that
+was previously stored.</p>
+<p>The <code>Node.getNode(String relPath)</code> method returns a reference to the node at
+the given path relative to this node. The path syntax follows common file
+system conventions: a forward slash separates node names, a single dot
+represents the current node, and a double dot the parent node. Thus the
+path <code>&quot;hello/world&quot;</code> identifies the <code>&quot;world&quot;</code> child node of the <code>&quot;hello&quot;</code> child
+node of the current node - in this case the root node. The end result is
+that the method returns a node instance that represents the same content
+node as the world instance created a few lines earlier.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>System.out.println(node.getPath()); 
+</code></pre></div>
+<p>Each content node and property is uniquely identified by its absolute path
+within the workspace. The absolute path starts with a forward slash and
+contains all the names of the ancestor nodes in order before the name of
+the current node or property.</p>
+<p>The path of a node or property can be retrieved using the Item.getPath()
+method. The <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Item.html?is-external=true">Item</a>
+interface is a superinterface of Node and Property, and contains all the
+functionality shared by nodes and properties.</p>
+<p>The node variable references the <code>&quot;world&quot;</code> node, so this statement will
+output the line <code>&quot;/hello/world&quot;</code>.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>System.out.println(node.getProperty(&quot;message&quot;).getString()); 
+</code></pre></div>
+<p>Properties can be accessed using the <code>Node.getProperty(String relPath)</code>
+method that returns an instance of the <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/Property.html?is-external=true">Property</a>
+interface that represents the property at the given path relative to the
+current node. In this case the &#x201c;message&#x201d; property is the one we created a
+few lines earlier.</p>
+<p>A JCR property can contain either a single or multiple values of a given
+type. There are property types for storing strings, numbers, dates, binary
+streams, node references, etc. We just want the single string value, so we
+use the <code>Property.getString()</code> method. The result of this statement is the
+line <code>&quot;Hello, World!&quot;</code> being outputted.</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>root.getNode(&quot;hello&quot;).remove(); 
+</code></pre></div>
+<p>Nodes and properties can be removed using the<code>Item.remove()</code> method. The
+method removes the entire content subtree, so we only need to remove the
+topmost <code>&quot;hello&quot;</code> node to get rid of all the content we added before.</p>
+<p>Removals are first stored in the session-local transient storage, just like
+added and changed content. Like before, the transient changes need to be
+explicitly saved for the content to be removed from the persistent storage.</p></section><section>
 <h2><a name="Hop_3:_Importing_content"></a>Hop 3: Importing content</h2>
 <p>TODO: Update to match the style of previous hops.</p>
-<p>To add content a bit more efficiently, you may want to try JCR&#x2019;s import facilities, such as Session.importXML. The following XML document by Elliotte Rusty Harold provides an interesting example that demonstrates a repository&#x2019;s namespace capabilities:</p>
+<p>To add content a bit more efficiently, you may want to try JCR's import
+facilities, such as Session.importXML. The following XML document by
+Elliotte Rusty Harold provides an interesting example that demonstrates a
+repository's namespace capabilities:</p>
 <p><b>test.xml</b></p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">&lt;xhtml:html xmlns:xhtml=&quot;http://www.w3.org/1999/xhtml&quot; 
+<div class="source"><pre class="prettyprint linenums"><code>&lt;xhtml:html xmlns:xhtml=&quot;http://www.w3.org/1999/xhtml&quot; 
 xmlns:mathml=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt; 
 &lt;xhtml:head&gt;&lt;xhtml:title&gt;Three Namespaces&lt;/xhtml:title&gt;&lt;/xhtml:head&gt; 
 &lt;xhtml:body&gt; 
@@ -508,12 +611,14 @@ width=&quot;12cm&quot; height=&quot;10cm
 &lt;xhtml:p&gt;Last Modified January 10, 2002&lt;/xhtml:p&gt; 
 &lt;/xhtml:body&gt; 
 &lt;/xhtml:html&gt; 
-</pre></div></div>
+</code></pre></div>
+<p>The third example application shown below will import the XML file called
+<code>test.xml</code> from the current directory into a new content repository node
+called <code>importxml</code>. Once the XML content is imported, the application
+recursively dumps the contents of the entire workspace using the simple
+<code>dump()</code> method.</p>
 
-<p>The third example application shown below will import the XML file called <code>test.xml</code> from the current directory into a new content repository node called <code>importxml</code>. Once the XML content is imported, the application recursively dumps the contents of the entire workspace using the simple <code>dump()</code> method.</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">import javax.jcr.*; 
+<div class="source"><pre class="prettyprint linenums"><code>import javax.jcr.*; 
 import java.io.FileInputStream;
 import org.apache.jackrabbit.commons.JcrUtils;
 
@@ -593,12 +698,10 @@ public class ThirdHop {
         } 
     } 
 } 
-</pre></div></div>
-
+</code></pre></div>
 <p>Running the ThirdHop class should produce output like the following:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">Importing XML... done. 
+<div class="source"><pre class="prettyprint linenums"><code>Importing XML... done. 
 / 
 /jcr:primaryType=rep:root 
 /jcr:system 
@@ -628,73 +731,90 @@ public class ThirdHop {
 . 
 . 
 . 
-</pre></div></div>
-
-<p>This hop has a lot of similarities with the Second Hop example: we create a new session with write access by logging in, next we insert data into the repository, this time by importing an xml file and finally we output the entire repository content.</p>
-<p>By now you should be familiar with logging into a repository (Repository.login), creating a new node (Node.addNode) under the repository root (Session.getRootNode) and saving the session so that our changes are persisted (Session.save).</p>
-<p>Let us look at the new methods used in this example, how to import xml content:</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">session.importXML(node.getPath(), xml, ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW);
-</pre></div></div>
-
-<p>This deserializes an XML document and adds the resulting item subgraph as a child of the node at the provided path.</p>
-<p>The flag <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/ImportUUIDBehavior.html?is-external=true">ImportUUIDBehavior</a> governs how the identifiers of incoming nodes are handled.</p>
+</code></pre></div>
+<p>This hop has a lot of similarities with the Second Hop example: we create a
+new session with write access by logging in, next we insert data into the
+repository, this time by importing an xml file and finally we output the
+entire repository content.</p>
+<p>By now you should be familiar with logging into a repository
+(Repository.login), creating a new node (Node.addNode) under the repository
+root (Session.getRootNode) and saving the session so that our changes are
+persisted (Session.save).</p>
+<p>Let us look at the new methods used in this example, how to import xml
+content:</p>
+
+<div class="source"><pre class="prettyprint linenums"><code>session.importXML(node.getPath(), xml, ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW);
+</code></pre></div>
+<p>This deserializes an XML document and adds the resulting item subgraph as a
+child of the node at the provided path.</p>
+<p>The flag <a class="externalLink" href="https://s.apache.org/jcr-2.0-javadoc/javax/jcr/ImportUUIDBehavior.html?is-external=true">ImportUUIDBehavior</a>
+governs how the identifiers of incoming nodes are handled.</p>
 <p>There are four options:</p>
 <ul>
 
 <li>
 
 <p><code>ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW</code>:<br />
-Incoming nodes are added in the same way that new node is added with Node.addNode. That is, they are either assigned newly created identifiers upon addition or upon save. In either case, identifier collisions will not occur.</p>
+Incoming nodes are added in
+the same way that new node is added with Node.addNode. That is, they are
+either assigned newly created identifiers upon addition or upon save. In
+either case, identifier collisions will not occur.</p>
 </li>
 <li>
 
 <p><code>ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING</code>:<br />
-If an incoming node has the same identifier as a node already existing in the workspace then the already existing node (and its subgraph) is removed from wherever it may be in the workspace before the incoming node is added. Note that this can result in nodes &#x201c;disappearing&#x201d; from locations in the workspace that are remote from the location to which the incoming subgraph is being written. Both the removal and the new addition will be dispatched on save.</p>
+If an incoming
+node has the same identifier as a node already existing in the workspace
+then the already existing node (and its subgraph) is removed from wherever
+it may be in the workspace before the incoming node is added. Note that
+this can result in nodes &#x201c;disappearing&#x201d; from locations in the workspace
+that are remote from the location to which the incoming subgraph is being
+written. Both the removal and the new addition will be dispatched on save.</p>
 </li>
 <li>
 
 <p><code>ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING</code>:<br />
-If an incoming node has the same identifier as a node already existing in the workspace, then the already-existing node is replaced by the incoming node in the same position as the existing node. Note that this may result in the incoming subgraph being disaggregated and &#x201c;spread around&#x201d; to different locations in the workspace. In the most extreme case this behavior may result in no node at all being added as child of parentAbsPath. This will occur if the topmost element of the incoming XML has the same identifier as an existing node elsewhere in the workspace. The change will be dispatched on save.</p>
+If an incoming
+node has the same identifier as a node already existing in the workspace,
+then the already-existing node is replaced by the incoming node in the same
+position as the existing node. Note that this may result in the incoming
+subgraph being disaggregated and &#x201c;spread around&#x201d; to different locations in
+the workspace. In the most extreme case this behavior may result in no node
+at all being added as child of parentAbsPath. This will occur if the
+topmost element of the incoming XML has the same identifier as an existing
+node elsewhere in the workspace. The change will be dispatched on save.</p>
 </li>
 <li>
 
 <p><code>ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW</code>:<br />
-If an incoming node has the same identifier as a node already existing in the workspace then an ItemExistsException is thrown.</p>
+If an incoming node has
+the same identifier as a node already existing in the workspace then an
+ItemExistsException is thrown.</p>
 </li>
 </ul>
 <p>Another interesting method is</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">void dump(Node node)
-</pre></div></div>
-
-<p>This can be used as an example of how to do a recursive traversal of all the repository, and check the properties of each node.</p>
-<p>Notice how we have to pay special attention to the multi-value properties, because that impacts the way we use them:</p>
-
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">property.getDefinition().isMultiple()
-</pre></div></div>
+<div class="source"><pre class="prettyprint linenums"><code>void dump(Node node)
+</code></pre></div>
+<p>This can be used as an example of how to do a recursive traversal of all
+the repository, and check the properties of each node.</p>
+<p>Notice how we have to pay special attention to the multi-value properties,
+because that impacts the way we use them:</p>
 
+<div class="source"><pre class="prettyprint linenums"><code>property.getDefinition().isMultiple()
+</code></pre></div>
 <p>if this yields true, then we are dealing with an array of values:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">Value[] values = property.getValues();
-</pre></div></div>
-
+<div class="source"><pre class="prettyprint linenums"><code>Value[] values = property.getValues();
+</code></pre></div>
 <p>or else, we can use the provided api shortcuts, to get the desired value:</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">property.getString()
-</pre></div></div>
-
+<div class="source"><pre class="prettyprint linenums"><code>property.getString()
+</code></pre></div>
 <p>which is equivalent to</p>
 
-<div class="source">
-<div class="source"><pre class="prettyprint linenums">property.getValue().getString()
-</pre></div></div>
-
+<div class="source"><pre class="prettyprint linenums"><code>property.getValue().getString()
+</code></pre></div>
 <p>A very good entry point for utilities related code examples is <a class="externalLink" href="http://jackrabbit.apache.org/api/2.10/org/apache/jackrabbit/commons/JcrUtils.html">JcrUtils</a>.</p></section>
         </main>
       </div>
@@ -707,10 +827,12 @@ If an incoming node has the same identif
 <a href="https://www.apache.org/">The Apache Software Foundation</a> &vert; <a href="https://privacy.apache.org/policies/privacy-policy-public.html">Privacy Policy</a>
 </p>
         </div>
-    <div id="ohloh" class="pull-right">
-      <script src="https://www.ohloh.net/p/jackrabbit/widgets/project_users_logo.js"></script>
-    </div>
-        </div>
+      </div>
     </footer>
+<script>
+	if(anchors) {
+	  anchors.add();
+	}
+</script>
   </body>
 </html>
\ No newline at end of file

Modified: jackrabbit/site/live/jcr/fonts/glyphicons-halflings-regular.eot
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/jcr/fonts/glyphicons-halflings-regular.eot?rev=1902520&r1=1902519&r2=1902520&view=diff
==============================================================================
Binary files - no diff available.