You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by tr...@apache.org on 2015/04/08 22:34:17 UTC

svn commit: r1672168 [10/33] - in /jackrabbit/site/live/jcr: ./ components/ css/ images/ images/logos/ images/profiles/ img/ js/ ocm/ status/

Added: jackrabbit/site/live/jcr/first-hops.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/jcr/first-hops.html?rev=1672168&view=auto
==============================================================================
--- jackrabbit/site/live/jcr/first-hops.html (added)
+++ jackrabbit/site/live/jcr/first-hops.html Wed Apr  8 20:34:14 2015
@@ -0,0 +1,958 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2015-04-08 
+ | Rendered using Apache Maven Fluido Skin 1.3.1
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20150408" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache Jackrabbit - First Hops</title>
+    <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.1.min.css" />
+    <link rel="stylesheet" href="./css/site.css" />
+    <link rel="stylesheet" href="./css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="./js/apache-maven-fluido-1.3.1.min.js"></script>
+
+    
+                  </head>
+        <body class="topBarEnabled">
+          
+    
+    
+            
+    
+    
+    <a href="http://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>
+  
+                
+                    
+                
+
+    <div id="topbar" class="navbar navbar-fixed-top ">
+      <div class="navbar-inner">
+                <div class="container-fluid">
+        <a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar">
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+        </a>
+                
+                                                                                <a class="brand" href="index.html"  title="Apache Jackrabbit">
+
+                                
+                                                                                                                    <img src="images/logos/jlogo.gif" alt="Apache Jackrabbit" />
+                
+                </a>
+                    
+                                <ul class="nav">
+                          <li class="dropdown">
+        <a href="#" 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>
+                  
+                      <li>      <a href="articles.html"  title="Articles">Articles</a>
+</li>
+                  
+                      <li>      <a href="frequently-asked-questions.html"  title="FAQ">FAQ</a>
+</li>
+                  
+                      <li>      <a href="http://wiki.apache.org/jackrabbit/FrontPage"  title="Jackrabbit Wiki">Jackrabbit Wiki</a>
+</li>
+                  
+                      <li>      <a href="jackrabbit-history.html"  title="Jackrabbit History">Jackrabbit History</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" 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 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>
+                  
+                      <li>      <a href="jackrabbit-configuration.html"  title="Jackrabbit Configuration">Jackrabbit Configuration</a>
+</li>
+                  
+                      <li>      <a href="node-types.html"  title="Node Types">Node Types</a>
+</li>
+                  
+                      <li>      <a href="object-content-mapping.html"  title="Object Content Mapping">Object Content Mapping</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" 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>
+                  
+                      <li>      <a href="building-jackrabbit.html"  title="Building Jackrabbit">Building Jackrabbit</a>
+</li>
+                  
+                      <li>      <a href="mailing-lists.html"  title="Mailing Lists">Mailing Lists</a>
+</li>
+                  
+                      <li>      <a href="issue-tracker.html"  title="Issue Tracker">Issue Tracker</a>
+</li>
+                  
+                      <li>      <a href="source-repository.html"  title="Source Repository">Source Repository</a>
+</li>
+                  
+                      <li>      <a href="continuous-integration.html"  title="Continuous Integration">Continuous Integration</a>
+</li>
+                  
+                      <li>      <a href="website.html"  title="Website">Website</a>
+</li>
+                  
+                      <li>      <a href="creating-releases.html"  title="Creating Releases">Creating Releases</a>
+</li>
+                  
+                      <li>      <a href="supporting-software-attribution.html"  title="Attribution">Attribution</a>
+</li>
+                  
+                      <li>      <a href="privacy-policy.html"  title="Privacy">Privacy</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache Software Foundation <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="http://www.apache.org/foundation/how-it-works.html"  title="Introduction">Introduction</a>
+</li>
+                  
+                      <li>      <a href="http://www.apache.org/foundation/sponsorship.html"  title="Sponsorship">Sponsorship</a>
+</li>
+                  
+                      <li>      <a href="http://www.apache.org/foundation/thanks.html"  title="Current Sponsors">Current Sponsors</a>
+</li>
+                          </ul>
+      </li>
+                  </ul>
+          
+          
+          
+                   
+                      </div>
+          
+        </div>
+      </div>
+    </div>
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                <div id="bannerLeft">
+                <h2>Apache Jackrabbit Site</h2>
+                </div>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2015-04-08
+                   </li>
+                      
+                
+                    
+      
+                            </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Apache Jackrabbit</li>
+                              
+      <li>
+  
+                          <a href="index.html" title="Welcome">
+          <i class="none"></i>
+        Welcome</a>
+            </li>
+                
+      <li>
+  
+                          <a href="downloads.html" title="Downloads">
+          <i class="none"></i>
+        Downloads</a>
+            </li>
+                
+      <li>
+  
+                          <a href="articles.html" title="Articles">
+          <i class="none"></i>
+        Articles</a>
+            </li>
+                
+      <li>
+  
+                          <a href="frequently-asked-questions.html" title="FAQ">
+          <i class="none"></i>
+        FAQ</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://wiki.apache.org/jackrabbit/FrontPage" class="externalLink" title="Jackrabbit Wiki">
+          <i class="none"></i>
+        Jackrabbit Wiki</a>
+            </li>
+                
+      <li>
+  
+                          <a href="jackrabbit-history.html" title="Jackrabbit History">
+          <i class="none"></i>
+        Jackrabbit History</a>
+            </li>
+                              <li class="nav-header">Documentation</li>
+                              
+      <li>
+  
+                          <a href="getting-started-with-apache-jackrabbit.html" title="Getting Started">
+          <i class="none"></i>
+        Getting Started</a>
+            </li>
+                
+      <li>
+  
+                          <a href="standalone-server.html" title="Standalone Server">
+          <i class="none"></i>
+        Standalone Server</a>
+            </li>
+                
+      <li>
+  
+                          <a href="jackrabbit-components.html" title="Jackrabbit Components">
+          <i class="none"></i>
+        Jackrabbit Components</a>
+            </li>
+                
+      <li class="active">
+  
+            <a href="#"><i class="none"></i>First Hops</a>
+          </li>
+                
+      <li>
+  
+                          <a href="jcr-api.html" title="JCR & API">
+          <i class="none"></i>
+        JCR & API</a>
+            </li>
+                
+      <li>
+  
+                          <a href="jackrabbit-architecture.html" title="Jackrabbit Architecture">
+          <i class="none"></i>
+        Jackrabbit Architecture</a>
+            </li>
+                
+      <li>
+  
+                          <a href="deployment-models.html" title="Deployment Models">
+          <i class="none"></i>
+        Deployment Models</a>
+            </li>
+                
+      <li>
+  
+                          <a href="jackrabbit-configuration.html" title="Jackrabbit Configuration">
+          <i class="none"></i>
+        Jackrabbit Configuration</a>
+            </li>
+                
+      <li>
+  
+                          <a href="node-types.html" title="Node Types">
+          <i class="none"></i>
+        Node Types</a>
+            </li>
+                
+      <li>
+  
+                          <a href="object-content-mapping.html" title="Object Content Mapping">
+          <i class="none"></i>
+        Object Content Mapping</a>
+            </li>
+                              <li class="nav-header">Development</li>
+                              
+      <li>
+  
+                          <a href="jackrabbit-team.html" title="Jackrabbit Team">
+          <i class="none"></i>
+        Jackrabbit Team</a>
+            </li>
+                
+      <li>
+  
+                          <a href="jackrabbit-roadmap.html" title="Jackrabbit Roadmap">
+          <i class="none"></i>
+        Jackrabbit Roadmap</a>
+            </li>
+                
+      <li>
+  
+                          <a href="building-jackrabbit.html" title="Building Jackrabbit">
+          <i class="none"></i>
+        Building Jackrabbit</a>
+            </li>
+                
+      <li>
+  
+                          <a href="mailing-lists.html" title="Mailing Lists">
+          <i class="none"></i>
+        Mailing Lists</a>
+            </li>
+                
+      <li>
+  
+                          <a href="issue-tracker.html" title="Issue Tracker">
+          <i class="none"></i>
+        Issue Tracker</a>
+            </li>
+                
+      <li>
+  
+                          <a href="source-repository.html" title="Source Repository">
+          <i class="none"></i>
+        Source Repository</a>
+            </li>
+                
+      <li>
+  
+                          <a href="continuous-integration.html" title="Continuous Integration">
+          <i class="none"></i>
+        Continuous Integration</a>
+            </li>
+                
+      <li>
+  
+                          <a href="website.html" title="Website">
+          <i class="none"></i>
+        Website</a>
+            </li>
+                
+      <li>
+  
+                          <a href="creating-releases.html" title="Creating Releases">
+          <i class="none"></i>
+        Creating Releases</a>
+            </li>
+                
+      <li>
+  
+                          <a href="supporting-software-attribution.html" title="Attribution">
+          <i class="none"></i>
+        Attribution</a>
+            </li>
+                
+      <li>
+  
+                          <a href="privacy-policy.html" title="Privacy">
+          <i class="none"></i>
+        Privacy</a>
+            </li>
+                              <li class="nav-header">Apache Software Foundation</li>
+                              
+      <li>
+  
+                          <a href="http://www.apache.org/foundation/how-it-works.html" class="externalLink" title="Introduction">
+          <i class="none"></i>
+        Introduction</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship">
+          <i class="none"></i>
+        Sponsorship</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Current Sponsors">
+          <i class="none"></i>
+        Current Sponsors</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr />
+
+           <div id="poweredBy">
+                   
+    <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
+
+    
+    <div class="g-plusone" data-href="http://www.apache.org/jackrabbit-site/" data-size="tall" ></div>
+
+                   <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                             <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
+        <img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" />
+      </a>
+                  </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   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>
+<div class="section">
+<h2>Hop 0: Getting started<a name="Hop_0:_Getting_started"></a></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>
+
+<div class="source">
+<pre>&lt;dependencies&gt; 
+    &lt;!-- The JCR API --&gt; 
+    &lt;dependency&gt; 
+        &lt;groupId&gt;javax.jcr&lt;/groupId&gt; 
+        &lt;artifactId&gt;jcr&lt;/artifactId&gt; 
+        &lt;version&gt;2.0&lt;/version&gt; 
+    &lt;/dependency&gt; 
+
+    &lt;!-- Jackrabbit content repository --&gt; 
+    &lt;dependency&gt; 
+        &lt;groupId&gt;org.apache.jackrabbit&lt;/groupId&gt; 
+        &lt;artifactId&gt;jackrabbit-core&lt;/artifactId&gt; 
+        &lt;version&gt;2.2.4&lt;/version&gt; 
+    &lt;/dependency&gt; 
+
+    &lt;!-- Use Log4J for logging --&gt; 
+    &lt;dependency&gt; 
+        &lt;groupId&gt;org.slf4j&lt;/groupId&gt; 
+        &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt; 
+        &lt;version&gt;1.5.11&lt;/version&gt; 
+    &lt;/dependency&gt; 
+&lt;/dependencies&gt; 
+</pre></div>
+<p>You probably have an error in your classpath settings if you get a <tt>ClassNotFoundException</tt> message when trying to compile or run the examples below. </p></div>
+<div class="section">
+<h2>Hop 1: Logging in to Jackrabbit<a name="Hop_1:_Logging_in_to_Jackrabbit"></a></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>
+
+<div class="source">
+<pre>import javax.jcr.Repository; 
+import javax.jcr.Session; 
+import org.apache.jackrabbit.core.TransientRepository; 
+
+/** 
+* First hop example. Logs in to a content repository and prints a 
+* status message. 
+*/ 
+public class FirstHop { 
+
+    /** 
+    * The main entry point of the example application. 
+    * 
+    * @param args command line arguments (ignored) 
+    * @throws Exception if an error occurs 
+    */ 
+    public static void main(String[] args) throws Exception { 
+        Repository repository = new TransientRepository(); 
+        Session session = repository.login(); 
+        try { 
+            String user = session.getUserID(); 
+            String name = repository.getDescriptor(Repository.REP_NAME_DESC); 
+            System.out.println( 
+            &quot;Logged in as &quot; + user + &quot; to a &quot; + name + &quot; repository.&quot;); 
+        } finally { 
+            session.logout(); 
+        } 
+    } 
+} 
+</pre></div>
+<p>You can also download the source file as <tt>FirstHop.java</tt>. If you have your classpath set up, you can compile the application with javac <tt>FirstHop.java</tt> and run it with java FirstHop to get the following output. </p>
+
+<div class="source">
+<pre>Logged in as anonymous to a Jackrabbit repository. 
+</pre></div>
+<p>In addition to producing the above status line the application copies a default repository configuration file to <tt>repository.xml</tt> and creates an initial Jackrabbit content repository in the repository subdirectory. You can use the system properties <tt>org.apache.jackrabbit.repository.conf</tt> and <tt>org.apache.jackrabbit.repository.home</tt> 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">
+<pre>import javax.jcr.Repository; 
+import javax.jcr.Session; 
+</pre></div>
+<p>The JCR API interfaces are located in the javax.jcr package found in the jcr-1.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="http://www.day.com/maven/javax.jcr/javadocs/jcr-2.0/javax/jcr/Repository.html?is-external=true">Repository</a> interface represents a given content repository instance and the <a class="externalLink" href="http://www.day.com/maven/javax.jcr/javadocs/jcr-2.0/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>import org.apache.jackrabbit.core.TransientRepository; 
+</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.2/org/apache/jackrabbit/core/TransientRepository.html">TransientRepository</a> class from Jackrabbit core. </p>
+
+<div class="source">
+<pre>public class FirstHop 
+public static void main(String[] args) throws Exception 
+</pre></div>
+<p>The FirstHop example is a simple standalone application that fits nicely in the <tt>main()</tt> 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>Repository repository = new TransientRepository(); 
+</pre></div>
+<p>The <tt>TransientRepository</tt> class implements the JCR Repository interface, so you can simply assign a <tt>TransientRepository</tt> instance to a Repository variable. The default constructor 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 <tt>TransientRepository</tt> 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>Session session = repository.login(); 
+</pre></div>
+<p>The default <tt>Repository.login()</tt> method starts a repository session using the default workspace and no user credentials. Jackrabbit tries to use the Java Authentication and Authorization Service (JAAS) configuration in such cases, but defaults to the anonymous user if a JAAS Subject is not found. </p>
+<p>Since we use the <tt>TransientRepository</tt> class as the Repository implementation, this step will also cause the repository to be initialized. </p>
+
+<div class="source">
+<pre>try { ... } finally { session.logout(); } 
+</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 <tt>Session.logout()</tt> 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>String user = session.getUserID(); 
+</pre></div>
+<p>The username or identifier of the user associated with a session is available using the <tt>Session.getUserID()</tt> method. Jackrabbit returns <tt>&quot;anonymous&quot;</tt> by default. </p>
+
+<div class="source">
+<pre>String name = repository.getDescriptor(Repository.REP_NAME_DESC); 
+</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="http://www.day.com/maven/javax.jcr/javadocs/jcr-2.0/javax/jcr/Repository.html?is-external=true">Repository</a> interface for a list of the standard repository descriptors. The <tt>REP_NAME_DESC</tt> descriptor contains the name of the repository implementation, in this case <tt>&quot;Jackrabbit&quot;</tt>. </p></div>
+<div class="section">
+<h2>Hop 2: Working with content<a name="Hop_2:_Working_with_content"></a></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>
+
+<div class="source">
+<pre>import javax.jcr.Repository; 
+import javax.jcr.Session; 
+import javax.jcr.SimpleCredentials; 
+import javax.jcr.Node; 
+import org.apache.jackrabbit.core.TransientRepository; 
+
+/** 
+* Second hop example. Stores, retrieves, and removes example content. 
+*/ 
+public class SecondHop { 
+
+    /** 
+    * The main entry point of the example application. 
+    * 
+    * @param args command line arguments (ignored) 
+    * @throws Exception if an error occurs 
+    */ 
+    public static void main(String[] args) throws Exception { 
+    Repository repository = new TransientRepository(); 
+        Session session = repository.login( 
+        new SimpleCredentials(&quot;username&quot;, &quot;password&quot;.toCharArray())); 
+        try { 
+            Node root = session.getRootNode(); 
+
+            // Store content 
+            Node hello = root.addNode(&quot;hello&quot;); 
+            Node world = hello.addNode(&quot;world&quot;); 
+            world.setProperty(&quot;message&quot;, &quot;Hello, World!&quot;); 
+            session.save(); 
+
+            // Retrieve content 
+            Node node = root.getNode(&quot;hello/world&quot;); 
+            System.out.println(node.getPath()); 
+            System.out.println(node.getProperty(&quot;message&quot;).getString()); 
+
+            // Remove content 
+            root.getNode(&quot;hello&quot;).remove(); 
+            session.save(); 
+        } finally { 
+            session.logout(); 
+        } 
+    } 
+
+} 
+</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>
+
+<div class="source">
+<pre>/hello/world 
+Hello, World! 
+</pre></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>
+
+<div class="source">
+<pre>import javax.jcr.SimpleCredentials; 
+import javax.jcr.Node; 
+</pre></div>
+<p>These are two new classes we need for this example. The <a class="externalLink" href="http://www.day.com/maven/javax.jcr/javadocs/jcr-2.0/javax/jcr/SimpleCredentials.html?is-external=true">SimpleCredentials</a> class is a simple implementation of the <a class="externalLink" href="http://www.day.com/maven/javax.jcr/javadocs/jcr-2.0/javax/jcr/Credentials.html?is-external=true">Credentials</a> interface used for passing explicit user credentials to the <tt>Repository.login(Credentials)</tt> method. </p>
+<p>The <a class="externalLink" href="http://www.day.com/maven/javax.jcr/javadocs/jcr-2.0/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="http://www.day.com/maven/javax.jcr/javadocs/jcr-2.0/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>new SimpleCredentials(&quot;username&quot;, &quot;password&quot;.toCharArray()) 
+</pre></div>
+<p>As discussed in the First Hop example, the default <tt>Repository.login()</tt> method 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 some credentials to the </p>
+
+<div class="source">
+<pre>Repository.login(Credentials credentials) method. 
+</pre></div>
+<p>The default Jackrabbit login mechanism accepts any username and password as valid credentials and returns a session with full write access. Thus we only need to construct and use a SimpleCredentials instance with some dummy username and password, in this case <tt>&quot;username&quot;</tt> and <tt>&quot;password&quot;</tt>. </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 <tt>String.toCharArray()</tt> method to satisfy the constructor. </p>
+
+<div class="source">
+<pre>Node root = session.getRootNode(); 
+</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 <tt>Session.getRootNode()</tt> method. Having a reference to the root node allows us to easily store and retrieve content in the current workspace. </p>
+
+<div class="source">
+<pre>Node hello = root.addNode(&quot;hello&quot;); 
+Node world = hello.addNode(&quot;world&quot;); 
+</pre></div>
+<p>New content nodes can be added using the <tt>Node.addNode(String relPath)</tt> 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 <tt>&quot;hello&quot;</tt> and <tt>&quot;world&quot;</tt>, with <tt>&quot;hello&quot;</tt> being a child of the root node and <tt>&quot;world&quot;</tt> a child of the <tt>&quot;hello&quot;</tt> node. </p>
+
+<div class="source">
+<pre>world.setProperty(&quot;message&quot;, &quot;Hello, World!&quot;); 
+</pre></div>
+<p>To add some content to the structure created using the <tt>&quot;hello&quot;</tt> and <tt>&quot;world&quot;</tt> nodes, we use the <tt>Node.setProperty(String name, String value)</tt> method to add a string property called <tt>&quot;message&quot;</tt> to the <tt>&quot;world&quot;</tt> node. The value of the property is the string <tt>&quot;Hello, World!&quot;</tt>. </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>session.save(); 
+</pre></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 <tt>Session.save()</tt> 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>Node node = root.getNode(&quot;hello/world&quot;); 
+</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&#x2019;s pretend that we&#x2019;ve started another session and want to retrieve the content that was previously stored. </p>
+<p>The <tt>Node.getNode(String relPath)</tt> 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 <tt>&quot;hello/world&quot;</tt> identifies the <tt>&quot;world&quot;</tt> child node of the <tt>&quot;hello&quot;</tt> 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>System.out.println(node.getPath()); 
+</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="http://www.day.com/maven/javax.jcr/javadocs/jcr-2.0/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 <tt>&quot;world&quot;</tt> node, so this statement will output the line <tt>&quot;/hello/world&quot;</tt>. </p>
+
+<div class="source">
+<pre>System.out.println(node.getProperty(&quot;message&quot;).getString()); 
+</pre></div>
+<p>Properties can be accessed using the <tt>Node.getProperty(String relPath)</tt> method that returns an instance of the <a class="externalLink" href="http://www.day.com/maven/javax.jcr/javadocs/jcr-2.0/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 <tt>Property.getString()</tt> method. The result of this statement is the line <tt>&quot;Hello, World!&quot;</tt> being outputted. </p>
+
+<div class="source">
+<pre>root.getNode(&quot;hello&quot;).remove(); 
+</pre></div>
+<p>Nodes and properties can be removed using the<tt>Item.remove()</tt> method. The method removes the entire content subtree, so we only need to remove the topmost <tt>&quot;hello&quot;</tt> 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>
+<p>Hop 3: Importing content &#x2014;&#x2014;&#x2014;&#x2014;&#x2014;&#x2014;&#x2014;&#x2014; 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><b>test.xml</b></p>
+
+<div class="source">
+<pre>&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; 
+&lt;xhtml:h1 align=&quot;center&quot;&gt;An Ellipse and a Rectangle&lt;/xhtml:h1&gt; 
+&lt;svg:svg xmlns:svg=&quot;http://www.w3.org/2000/svg&quot; 
+width=&quot;12cm&quot; height=&quot;10cm&quot;&gt; 
+&lt;svg:ellipse rx=&quot;110&quot; ry=&quot;130&quot; /&gt; 
+&lt;svg:rect x=&quot;4cm&quot; y=&quot;1cm&quot; width=&quot;3cm&quot; height=&quot;6cm&quot; /&gt; 
+&lt;/svg:svg&gt; 
+&lt;xhtml:p&gt;The equation for ellipses&lt;/xhtml:p&gt; 
+&lt;mathml:math&gt; 
+&lt;mathml:apply&gt; 
+&lt;mathml:eq/&gt; 
+&lt;mathml:cn&gt; 1 &lt;/mathml:cn&gt; 
+&lt;mathml:apply&gt; 
+&lt;mathml:plus/&gt; 
+&lt;mathml:apply&gt; 
+&lt;mathml:divide/&gt; 
+&lt;mathml:apply&gt; 
+&lt;mathml:power/&gt; 
+&lt;mathml:ci&gt; x &lt;/mathml:ci&gt; 
+&lt;mathml:cn&gt; 2 &lt;/mathml:cn&gt; 
+&lt;/mathml:apply&gt; 
+&lt;mathml:apply&gt; 
+&lt;mathml:power/&gt; 
+&lt;mathml:ci&gt; a &lt;/mathml:ci&gt; 
+&lt;mathml:cn&gt; 2 &lt;/mathml:cn&gt; 
+&lt;/mathml:apply&gt; 
+&lt;/mathml:apply&gt; 
+&lt;mathml:apply&gt; 
+&lt;mathml:divide/&gt; 
+&lt;mathml:apply&gt; 
+&lt;mathml:power/&gt; 
+&lt;mathml:ci&gt; y &lt;/mathml:ci&gt; 
+&lt;mathml:cn&gt; 2 &lt;/mathml:cn&gt; 
+&lt;/mathml:apply&gt; 
+&lt;mathml:apply&gt; 
+&lt;mathml:power/&gt; 
+&lt;mathml:ci&gt; b &lt;/mathml:ci&gt; 
+&lt;mathml:cn&gt; 2 &lt;/mathml:cn&gt; 
+&lt;/mathml:apply&gt; 
+&lt;/mathml:apply&gt; 
+&lt;/mathml:apply&gt; 
+&lt;/mathml:apply&gt; 
+&lt;/mathml:math&gt; 
+&lt;xhtml:hr/&gt; 
+&lt;xhtml:p&gt;Last Modified January 10, 2002&lt;/xhtml:p&gt; 
+&lt;/xhtml:body&gt; 
+&lt;/xhtml:html&gt; 
+</pre></div>
+<p>The third example application shown below will import the XML file called <tt>test.xml</tt> from the current directory into a new content repository node called <tt>importxml</tt>. Once the XML content is imported, the application recursively dumps the contents of the entire workspace using the simple <tt>dump()</tt> method. </p>
+
+<div class="source">
+<pre>import javax.jcr.*; 
+import org.apache.jackrabbit.core.TransientRepository; 
+import java.io.FileInputStream; 
+
+/** 
+* Third Jackrabbit example application. Imports an example XML file 
+* and outputs the contents of the entire workspace. 
+*/ 
+public class ThirdHop { 
+
+    /**
+    * The main entry point of the example application.
+    *
+    * @param args command line arguments (ignored)
+    * @throws Exception if an error occurs
+    */
+    public static void main(String[] args) throws Exception { 
+        Repository repository = new TransientRepository(); 
+            Session session = repository.login( 
+            new SimpleCredentials(&quot;username&quot;, &quot;password&quot;.toCharArray())); 
+            try { 
+                Node root = session.getRootNode(); 
+
+                // Import the XML file unless already imported 
+                if (!root.hasNode(&quot;importxml&quot;)) { 
+                    System.out.print(&quot;Importing xml... &quot;); 
+
+                    // Create an unstructured node under which to import the XML 
+                    Node node = root.addNode(&quot;importxml&quot;, &quot;nt:unstructured&quot;); 
+
+                    // Import the file &quot;test.xml&quot; under the created node 
+                    FileInputStream xml = new FileInputStream(&quot;test.xml&quot;);
+                    session.importXML( 
+                    node.getPath(), xml, ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW); 
+                    xml.close();
+                    session.save(); 
+                    System.out.println(&quot;done.&quot;); 
+                } 
+
+                //output the repository content
+                dump(root); 
+            } finally { 
+                session.logout(); 
+            } 
+        } 
+
+    /** Recursively outputs the contents of the given node. */ 
+    private static void dump(Node node) throws RepositoryException { 
+        // First output the node path 
+        System.out.println(node.getPath()); 
+        // Skip the virtual (and large!) jcr:system subtree 
+        if (node.getName().equals(&quot;jcr:system&quot;)) { 
+            return; 
+        } 
+
+        // Then output the properties 
+        PropertyIterator properties = node.getProperties(); 
+        while (properties.hasNext()) { 
+            Property property = properties.nextProperty(); 
+            if (property.getDefinition().isMultiple()) { 
+                // A multi-valued property, print all values 
+                Value[] values = property.getValues(); 
+                for (int i = 0; i &lt; values.length; i++) { 
+                    System.out.println( 
+                    property.getPath() + &quot; = &quot; + values[i] .getString()); 
+                } 
+            } else { 
+                // A single-valued property 
+                System.out.println( 
+                property.getPath() + &quot; = &quot; + property.getString()); 
+            } 
+        } 
+
+        // Finally output all the child nodes recursively 
+        NodeIterator nodes = node.getNodes(); 
+        while (nodes.hasNext()) { 
+            dump(nodes.nextNode()); 
+        } 
+    } 
+} 
+</pre></div>
+<p>Running the ThirdHop class should produce output like the following: </p>
+
+<div class="source">
+<pre>Importing XML... done. 
+/ 
+/jcr:primaryType=rep:root 
+/jcr:system 
+/importxml 
+/importxml/jcr:primaryType=nt:unstructured 
+/importxml/xhtml:html 
+/importxml/xhtml:html/jcr:primaryType=nt:unstructured 
+/importxml/xhtml:html/xhtml:head 
+/importxml/xhtml:html/xhtml:head/jcr:primaryType=nt:unstructured 
+/importxml/xhtml:html/xhtml:head/xhtml:title 
+/importxml/xhtml:html/xhtml:head/xhtml:title/jcr:primaryType=nt:unstructured 
+/importxml/xhtml:html/xhtml:head/xhtml:title/jcr:xmltext 
+/importxml/xhtml:html/xhtml:head/xhtml:title/jcr:xmltext/jcr:primaryType=nt:unstructured 
+/importxml/xhtml:html/xhtml:head/xhtml:title/jcr:xmltext/jcr:xmlcharacters=Three Namespaces 
+/importxml/xhtml:html/xhtml:body 
+/importxml/xhtml:html/xhtml:body/jcr:primaryType=nt:unstructured 
+/importxml/xhtml:html/xhtml:body/xhtml:h1 
+/importxml/xhtml:html/xhtml:body/xhtml:h1/jcr:primaryType=nt:unstructured 
+/importxml/xhtml:html/xhtml:body/xhtml:h1/align=center 
+/importxml/xhtml:html/xhtml:body/xhtml:h1/jcr:xmltext 
+/importxml/xhtml:html/xhtml:body/xhtml:h1/jcr:xmltext/jcr:primaryType=nt:unstructured 
+/importxml/xhtml:html/xhtml:body/xhtml:h1/jcr:xmltext/jcr:xmlcharacters=An Ellipse and a Rectangle 
+/importxml/xhtml:html/xhtml:body/svg:svg 
+/importxml/xhtml:html/xhtml:body/svg:svg/jcr:primaryType=nt:unstructured 
+/importxml/xhtml:html/xhtml:body/svg:svg/width=12cm 
+/importxml/xhtml:html/xhtml:body/svg:svg/height=10cm 
+. 
+. 
+. 
+</pre></div>
+<p>This hop has a lot of similarities with the Second Hop example: we create a new session with write access by loggin 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 loggin 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>session.importXML(node.getPath(), xml, ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW);
+</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="http://www.day.com/maven/javax.jcr/javadocs/jcr-2.0/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><tt>ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW</tt>:<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></li>
+  
+<li>
+<p><tt>ImportUUIDBehavior.IMPORT_UUID_COLLISION_REMOVE_EXISTING</tt>:<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></li>
+  
+<li>
+<p><tt>ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING</tt>:<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></li>
+  
+<li>
+<p><tt>ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW</tt>:<br />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">
+<pre>void dump(Node node)
+</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>property.getDefinition().isMultiple()
+</pre></div>
+<p>if this yields true, then we are dealing with an array of values:</p>
+
+<div class="source">
+<pre>Value[] values = property.getValues();
+</pre></div>
+<p>or else, we can use the provided api shortcuts, to get the desired value:</p>
+
+<div class="source">
+<pre>property.getString()
+</pre></div>
+<p>which is equivalent to </p>
+
+<div class="source">
+<pre>property.getValue().getString()
+</pre></div>
+<p>A very good entry point for utilities related code examples is <a class="externalLink" href="http://jackrabbit.apache.org/api/2.2/org/apache/jackrabbit/commons/JcrUtils.html">JcrUtils</a>.</p></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+                      <div class="row-fluid">
+                              <p >Copyright &copy;                    2015
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All rights reserved.      
+                    
+      </p>
+        </div>
+
+        
+        
+          
+    
+    
+    <div id="ohloh" class="pull-right">
+      <script type="text/javascript" src="http://www.ohloh.net/p/jackrabbit/widgets/project_users_logo.js"></script>
+    </div>
+        </div>
+    </footer>
+        </body>
+</html>
\ No newline at end of file

Added: jackrabbit/site/live/jcr/frequently-asked-questions.html
URL: http://svn.apache.org/viewvc/jackrabbit/site/live/jcr/frequently-asked-questions.html?rev=1672168&view=auto
==============================================================================
--- jackrabbit/site/live/jcr/frequently-asked-questions.html (added)
+++ jackrabbit/site/live/jcr/frequently-asked-questions.html Wed Apr  8 20:34:14 2015
@@ -0,0 +1,603 @@
+<!DOCTYPE html>
+<!--
+ | Generated by Apache Maven Doxia at 2015-04-08 
+ | Rendered using Apache Maven Fluido Skin 1.3.1
+-->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <meta charset="UTF-8" />
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta name="Date-Revision-yyyymmdd" content="20150408" />
+    <meta http-equiv="Content-Language" content="en" />
+    <title>Apache Jackrabbit - Frequently Asked Questions</title>
+    <link rel="stylesheet" href="./css/apache-maven-fluido-1.3.1.min.css" />
+    <link rel="stylesheet" href="./css/site.css" />
+    <link rel="stylesheet" href="./css/print.css" media="print" />
+
+      
+    <script type="text/javascript" src="./js/apache-maven-fluido-1.3.1.min.js"></script>
+
+    
+                  </head>
+        <body class="topBarEnabled">
+          
+    
+    
+            
+    
+    
+    <a href="http://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>
+  
+                
+                    
+                
+
+    <div id="topbar" class="navbar navbar-fixed-top ">
+      <div class="navbar-inner">
+                <div class="container-fluid">
+        <a data-target=".nav-collapse" data-toggle="collapse" class="btn btn-navbar">
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+          <span class="icon-bar"></span>
+        </a>
+                
+                                                                                <a class="brand" href="index.html"  title="Apache Jackrabbit">
+
+                                
+                                                                                                                    <img src="images/logos/jlogo.gif" alt="Apache Jackrabbit" />
+                
+                </a>
+                    
+                                <ul class="nav">
+                          <li class="dropdown">
+        <a href="#" 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>
+                  
+                      <li>      <a href="articles.html"  title="Articles">Articles</a>
+</li>
+                  
+                      <li>      <a href="frequently-asked-questions.html"  title="FAQ">FAQ</a>
+</li>
+                  
+                      <li>      <a href="http://wiki.apache.org/jackrabbit/FrontPage"  title="Jackrabbit Wiki">Jackrabbit Wiki</a>
+</li>
+                  
+                      <li>      <a href="jackrabbit-history.html"  title="Jackrabbit History">Jackrabbit History</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" 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 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>
+                  
+                      <li>      <a href="jackrabbit-configuration.html"  title="Jackrabbit Configuration">Jackrabbit Configuration</a>
+</li>
+                  
+                      <li>      <a href="node-types.html"  title="Node Types">Node Types</a>
+</li>
+                  
+                      <li>      <a href="object-content-mapping.html"  title="Object Content Mapping">Object Content Mapping</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" 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>
+                  
+                      <li>      <a href="building-jackrabbit.html"  title="Building Jackrabbit">Building Jackrabbit</a>
+</li>
+                  
+                      <li>      <a href="mailing-lists.html"  title="Mailing Lists">Mailing Lists</a>
+</li>
+                  
+                      <li>      <a href="issue-tracker.html"  title="Issue Tracker">Issue Tracker</a>
+</li>
+                  
+                      <li>      <a href="source-repository.html"  title="Source Repository">Source Repository</a>
+</li>
+                  
+                      <li>      <a href="continuous-integration.html"  title="Continuous Integration">Continuous Integration</a>
+</li>
+                  
+                      <li>      <a href="website.html"  title="Website">Website</a>
+</li>
+                  
+                      <li>      <a href="creating-releases.html"  title="Creating Releases">Creating Releases</a>
+</li>
+                  
+                      <li>      <a href="supporting-software-attribution.html"  title="Attribution">Attribution</a>
+</li>
+                  
+                      <li>      <a href="privacy-policy.html"  title="Privacy">Privacy</a>
+</li>
+                          </ul>
+      </li>
+                <li class="dropdown">
+        <a href="#" class="dropdown-toggle" data-toggle="dropdown">Apache Software Foundation <b class="caret"></b></a>
+        <ul class="dropdown-menu">
+        
+                      <li>      <a href="http://www.apache.org/foundation/how-it-works.html"  title="Introduction">Introduction</a>
+</li>
+                  
+                      <li>      <a href="http://www.apache.org/foundation/sponsorship.html"  title="Sponsorship">Sponsorship</a>
+</li>
+                  
+                      <li>      <a href="http://www.apache.org/foundation/thanks.html"  title="Current Sponsors">Current Sponsors</a>
+</li>
+                          </ul>
+      </li>
+                  </ul>
+          
+          
+          
+                   
+                      </div>
+          
+        </div>
+      </div>
+    </div>
+    
+        <div class="container-fluid">
+          <div id="banner">
+        <div class="pull-left">
+                                <div id="bannerLeft">
+                <h2>Apache Jackrabbit Site</h2>
+                </div>
+                      </div>
+        <div class="pull-right">  </div>
+        <div class="clear"><hr/></div>
+      </div>
+
+      <div id="breadcrumbs">
+        <ul class="breadcrumb">
+                
+                    
+                  <li id="publishDate">Last Published: 2015-04-08
+                   </li>
+                      
+                
+                    
+      
+                            </ul>
+      </div>
+
+            
+      <div class="row-fluid">
+        <div id="leftColumn" class="span3">
+          <div class="well sidebar-nav">
+                
+                    
+                <ul class="nav nav-list">
+                    <li class="nav-header">Apache Jackrabbit</li>
+                              
+      <li>
+  
+                          <a href="index.html" title="Welcome">
+          <i class="none"></i>
+        Welcome</a>
+            </li>
+                
+      <li>
+  
+                          <a href="downloads.html" title="Downloads">
+          <i class="none"></i>
+        Downloads</a>
+            </li>
+                
+      <li>
+  
+                          <a href="articles.html" title="Articles">
+          <i class="none"></i>
+        Articles</a>
+            </li>
+                
+      <li class="active">
+  
+            <a href="#"><i class="none"></i>FAQ</a>
+          </li>
+                
+      <li>
+  
+                          <a href="http://wiki.apache.org/jackrabbit/FrontPage" class="externalLink" title="Jackrabbit Wiki">
+          <i class="none"></i>
+        Jackrabbit Wiki</a>
+            </li>
+                
+      <li>
+  
+                          <a href="jackrabbit-history.html" title="Jackrabbit History">
+          <i class="none"></i>
+        Jackrabbit History</a>
+            </li>
+                              <li class="nav-header">Documentation</li>
+                              
+      <li>
+  
+                          <a href="getting-started-with-apache-jackrabbit.html" title="Getting Started">
+          <i class="none"></i>
+        Getting Started</a>
+            </li>
+                
+      <li>
+  
+                          <a href="standalone-server.html" title="Standalone Server">
+          <i class="none"></i>
+        Standalone Server</a>
+            </li>
+                
+      <li>
+  
+                          <a href="jackrabbit-components.html" title="Jackrabbit Components">
+          <i class="none"></i>
+        Jackrabbit Components</a>
+            </li>
+                
+      <li>
+  
+                          <a href="first-hops.html" title="First Hops">
+          <i class="none"></i>
+        First Hops</a>
+            </li>
+                
+      <li>
+  
+                          <a href="jcr-api.html" title="JCR & API">
+          <i class="none"></i>
+        JCR & API</a>
+            </li>
+                
+      <li>
+  
+                          <a href="jackrabbit-architecture.html" title="Jackrabbit Architecture">
+          <i class="none"></i>
+        Jackrabbit Architecture</a>
+            </li>
+                
+      <li>
+  
+                          <a href="deployment-models.html" title="Deployment Models">
+          <i class="none"></i>
+        Deployment Models</a>
+            </li>
+                
+      <li>
+  
+                          <a href="jackrabbit-configuration.html" title="Jackrabbit Configuration">
+          <i class="none"></i>
+        Jackrabbit Configuration</a>
+            </li>
+                
+      <li>
+  
+                          <a href="node-types.html" title="Node Types">
+          <i class="none"></i>
+        Node Types</a>
+            </li>
+                
+      <li>
+  
+                          <a href="object-content-mapping.html" title="Object Content Mapping">
+          <i class="none"></i>
+        Object Content Mapping</a>
+            </li>
+                              <li class="nav-header">Development</li>
+                              
+      <li>
+  
+                          <a href="jackrabbit-team.html" title="Jackrabbit Team">
+          <i class="none"></i>
+        Jackrabbit Team</a>
+            </li>
+                
+      <li>
+  
+                          <a href="jackrabbit-roadmap.html" title="Jackrabbit Roadmap">
+          <i class="none"></i>
+        Jackrabbit Roadmap</a>
+            </li>
+                
+      <li>
+  
+                          <a href="building-jackrabbit.html" title="Building Jackrabbit">
+          <i class="none"></i>
+        Building Jackrabbit</a>
+            </li>
+                
+      <li>
+  
+                          <a href="mailing-lists.html" title="Mailing Lists">
+          <i class="none"></i>
+        Mailing Lists</a>
+            </li>
+                
+      <li>
+  
+                          <a href="issue-tracker.html" title="Issue Tracker">
+          <i class="none"></i>
+        Issue Tracker</a>
+            </li>
+                
+      <li>
+  
+                          <a href="source-repository.html" title="Source Repository">
+          <i class="none"></i>
+        Source Repository</a>
+            </li>
+                
+      <li>
+  
+                          <a href="continuous-integration.html" title="Continuous Integration">
+          <i class="none"></i>
+        Continuous Integration</a>
+            </li>
+                
+      <li>
+  
+                          <a href="website.html" title="Website">
+          <i class="none"></i>
+        Website</a>
+            </li>
+                
+      <li>
+  
+                          <a href="creating-releases.html" title="Creating Releases">
+          <i class="none"></i>
+        Creating Releases</a>
+            </li>
+                
+      <li>
+  
+                          <a href="supporting-software-attribution.html" title="Attribution">
+          <i class="none"></i>
+        Attribution</a>
+            </li>
+                
+      <li>
+  
+                          <a href="privacy-policy.html" title="Privacy">
+          <i class="none"></i>
+        Privacy</a>
+            </li>
+                              <li class="nav-header">Apache Software Foundation</li>
+                              
+      <li>
+  
+                          <a href="http://www.apache.org/foundation/how-it-works.html" class="externalLink" title="Introduction">
+          <i class="none"></i>
+        Introduction</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://www.apache.org/foundation/sponsorship.html" class="externalLink" title="Sponsorship">
+          <i class="none"></i>
+        Sponsorship</a>
+            </li>
+                
+      <li>
+  
+                          <a href="http://www.apache.org/foundation/thanks.html" class="externalLink" title="Current Sponsors">
+          <i class="none"></i>
+        Current Sponsors</a>
+            </li>
+            </ul>
+                
+                    
+                
+          <hr />
+
+           <div id="poweredBy">
+                   
+    <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
+
+    
+    <div class="g-plusone" data-href="http://www.apache.org/jackrabbit-site/" data-size="tall" ></div>
+
+                   <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                            <div class="clear"></div>
+                             <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy">
+        <img class="builtBy" alt="Built by Maven" src="./images/logos/maven-feather.png" />
+      </a>
+                  </div>
+          </div>
+        </div>
+        
+                
+        <div id="bodyColumn"  class="span9" >
+                                  
+            <!-- Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License. --><h1>Frequently Asked Questions</h1>
+<div class="section">
+<h2>General<a name="General"></a></h2>
+<div class="section">
+<h3>What is JCR?<a name="What_is_JCR"></a></h3>
+<p>JCR is the acronym of the Content Repository for Java technology API, a standard interface for accessing content repositories. JCR version 1.0 was specified in Java Specification Request 170 (<a class="externalLink" href="http://jcp.org/en/jsr/detail?id=170">JSR 170</a>), and version 2.0 is currently under work in [JSR 283|http://jcp.org/en/jsr/detail?id=283].</p></div>
+<div class="section">
+<h3>What is a content repository?<a name="What_is_a_content_repository"></a></h3>
+<p>A content repository is an information management system that provides various services for storing, accessing, and managing content. In addition to a hierarchically structured storage, common services of a content repository are versioning, access control, full text searching, and event monitoring. A content repository is not a content management system (CMS), although most existing CMSs contain a custom content repository implementation, often based on the file system or a relational database.</p></div>
+<div class="section">
+<h3>What is Apache Jackrabbit?<a name="What_is_Apache_Jackrabbit"></a></h3>
+<p>Apache Jackrabbit is a fully featured content repository that implements the entire JCR API. The Jackrabbit project was started when Day Software, the JSR-170 specification lead, licensed their initial implementation of the JCR reference implementation. The Jackrabbit codebase was used for the official reference implementation (RI) and technology compatibility kit (TCK) released along with the final JCR API.</p></div>
+<div class="section">
+<h3>What do I do if I have a question?<a name="What_do_I_do_if_I_have_a_question"></a></h3>
+<p>Please ask questions on the <a class="externalLink" href="http://jackrabbit.apache.org/mailing-lists.html">Jackrabbit mailing lists</a>. There is the users list for questions around using JCR and Jackrabbit and the dev list for the development of Jackrabbit itself and for people starting to extend Jackrabbit or other advanced topics.</p></div></div>
+<div class="section">
+<h2>Building Jackrabbit<a name="Building_Jackrabbit"></a></h2>
+<div class="section">
+<h3>How do I build the Apache Jackrabbit sources?<a name="How_do_I_build_the_Apache_Jackrabbit_sources"></a></h3>
+<p>See the <a href="building-jackrabbit.html">Building Jackrabbit</a> page for detailed build instructions.</p></div></div>
+<div class="section">
+<h2>Using Jackrabbit<a name="Using_Jackrabbit"></a></h2>
+<div class="section">
+<h3>How do I do X with JCR/Jackrabbit?<a name="How_do_I_do_X_with_JCRJackrabbit"></a></h3>
+<p>See the JCR specification, the JCR API documentation, or the Examples page on the Jackrabbit wiki for information on how to perform various operation using the JCR API.</p>
+<p>For Jackrabbit features (like access control and node type management) not covered by the JCR API, see the Examples page on the wiki, the Jackrabbit javadocs, or contact the Jackrabbit mailing list.</p></div>
+<div class="section">
+<h3>How do I use transactions with JCR?<a name="How_do_I_use_transactions_with_JCR"></a></h3>
+<p>See the mailing list announcement for a simple example on using the JTA support in Jackrabbit. For a more complete explanation of the transaction features, please see section 8.1 Transactions of the JCR specification.</p></div>
+<div class="section">
+<h3>How do I create new workspaces in Jackrabbit?<a name="How_do_I_create_new_workspaces_in_Jackrabbit"></a></h3>
+<p>The JCR 2.0 API has two [Workspace.createWorkspace()](<a class="externalLink" href="http://www.day.com/maven/jsr170/javadocs/jcr-2.0/javax/jcr/Workspace.html#createWorkspace(java.lang.String)">http://www.day.com/maven/jsr170/javadocs/jcr-2.0/javax/jcr/Workspace.html#createWorkspace(java.lang.String)</a>) methods for that.</p>
+<p>The JCR 1.0 API does not contain features for creating or managing workspaces, so you need to use Jackrabbit-specific functionality for creating new workspaces. You can create a new workspace either manually or programmatically.</p>
+<p>The manual way is to create a new workspace directory within the repository home directory and to place a new workspace.xml configuration file in that folder. You can use the configuration file of an existing workspace as an example, just remember to change the name of the workspace in the Workspace name=&#x201c;&#x2026;&#x201d; tag. See the <a href="jackrabbit-configuration.html">Jackrabbit Configuration</a> page for configuration details. Note also that you need to restart the repository instance to access the new workspace.</p>
+<p>The programmatic way is to acquire a Workspace instance using the normal JCR API and to cast the instance to the JackrabbitWorkspace interface. You can then use the createWorkspace(String) method to create new workspaces.</p></div>
+<div class="section">
+<h3>How do I delete a workspace in Jackrabbit?<a name="How_do_I_delete_a_workspace_in_Jackrabbit"></a></h3>
+<p>There is currently no programmatic way to delete workspaces. You can delete a workspace by manually removing the workspace directory when the repository instance is not running.</p></div>
+<div class="section">
+<h3>How do I deploy Jackrabbit into Tomcat?<a name="How_do_I_deploy_Jackrabbit_into_Tomcat"></a></h3>
+
+<ul>
+  
+<li>Download <a class="externalLink" href="http://www.day.com/maven/javax.jcr/jars/jcr-1.0.jar">jcr-1.0.jar</a> and put it into <tt>&lt;tomcat-install-dir&gt;/shared/lib</tt>.</li>
+  
+<li>Get the WAR distribution from the <a href="downloads.html">Downloads</a> page and deploy it into Tomcat.</li>
+  
+<li>Point your browser to <tt>http://**localhost:8080/jackrabbit-webapp-&lt;version&gt;</tt></li>
+</ul></div></div>
+<div class="section">
+<h2>Access control<a name="Access_control"></a></h2>
+<div class="section">
+<h3>How do I use LDAP, Kerberos, or some other authentication mechanism with Jackrabbit?<a name="How_do_I_use_LDAP_Kerberos_or_some_other_authentication_mechanism_with_Jackrabbit"></a></h3>
+<p>Jackrabbit uses the Java Authentication and Authorization Service (JAAS) for authenticating users. You should be able to use any JAAS LoginModule implementation (e.g. the LoginModules in thecom.sum.security.auth.modulepackage) for authentication. See the JAAS documentation for configuration instructions.</p></div>
+<div class="section">
+<h3>How do I manage the access rights of authenticated users?<a name="How_do_I_manage_the_access_rights_of_authenticated_users"></a></h3>
+<p>The current JackrabbitSimpleAccessManager class only supports three access levels: anonymous, normal, and system. Anonymous users have read access while normal and system users have full read-write access. You need to implement a custom AccessManager class to get more fine-grained access control.</p></div></div>
+<div class="section">
+<h2>Persistence managers<a name="Persistence_managers"></a></h2>
+<div class="section">
+<h3>What is a persistence manager?<a name="What_is_a_persistence_manager"></a></h3>
+<p>A persistence manager (PM) is an internal Jackrabbit component that handles the persistent storage of content nodes and properties. Each workspace of a Jackrabbit content repository uses a separate persistence manager to store the content in that workspace. Also the Jackrabbit version handler uses a separate persistence manager.The persistence manager sits at the very bottom layer of the Jackrabbit system architecture. Reliability, integrity and performance of the PM are crucial to the overall stability and performance of the repository. If e.g. the data that a PM is based upon is allowed to change through external means the integrity of the repository would be at risk (think of referential integrity / node references e.g.).</p>
+<p>In practice, a persistence manager is any Java class that implements the PersistenceManager interface and the associated behavioural contracts. Jackrabbit contains a set of built-in persistence manager classes that cover most of the deployment needs. There are also a few contributed persistence managers that give additional flexibility.</p></div>
+<div class="section">
+<h3>What is a Jackrabbit file system?<a name="What_is_a_Jackrabbit_file_system"></a></h3>
+<p>A Jackrabbit file system (FS) is an internal component that implements standard file system operations on top of some underlying storage mechanism (a normal file system, a database, a webdav server,<br />or a custom file format). A file system component is any Java class that implements the FileSystem interface and the associated behavioral contracts. File systems are used in Jackrabbit both as sub-components of the persistence managers and for general storage needs (for example to store the full text indexes).</p></div>
+<div class="section">
+<h3>Can I use a persistence manager to access an existing data source?<a name="Can_I_use_a_persistence_manager_to_access_an_existing_data_source"></a></h3>
+<p>No. The persistence manager interface was never intended as being a general SPI that you could implement in order to integrate external data sources with proprietary formats (e.g. a customers database). The reason why we abstracted the PM interface was to leave room for future performance optimizations that would not affect the rest of the implementation (e.g. by storing the raw data in a b-tree based database instead of individual file).</p></div>
+<div class="section">
+<h3>How smart should a persistence manager be?<a name="How_smart_should_a_persistence_manager_be"></a></h3>
+<p>A persistence manager should not be intelligent, i.e. it should not interpret the content it is managing. The only thing it should care about is to efficiently, consistently, and reliably store and read the content encapsulated in the passed NodeState and PropertyState objects. Though it might be feasible to write a custom persistence manager to represent existing legacy data in a level-1 (read-only) repository, I don&#x2019;t think the same is possible for a level-2 repository and I certainly would not recommend it.</p></div></div>
+<div class="section">
+<h2>Query<a name="Query"></a></h2>
+<div class="section">
+<h3>I&#x2019;ve configured textFilterClasses but my query still doesn&#x2019;t work, what&#x2019;s wrong?<a name="Ive_configured_textFilterClasses_but_my_query_still_doesnt_work_whats_wrong"></a></h3>
+<p>Make sure you changed existing workspace.xml files as well. The workspace element in <tt>repository.xml only</tt> acts as a template for new workspaces.</p>
+<p>Verify that you also put the jar files into the classpath that jackrabbit depends on for text extraction. You can find all required jar files inside the jackrabbit-webapp war file (the <i>WEB-INF/lib</i> folder). Go to the <a href="downloads.html">downloads</a> page to get the war file.</p>
+<p>Some documents may still not be searchable for various reasons: the document is corrupt, bug in one of the libraries that extract text, document is encrypted or otherwise protected, etc.</p></div>
+<div class="section">
+<h3>Why doesn&#x2019;t <tt>//*\[jcr:contains(@jcr:data, 'foo')](jcr:contains(@jcr:data,-'foo').html)</tt> return matches for binary content?<a name="Why_doesnt_jcr:containsjcr:data_foojcr:containsjcr:data-foo.html_return_matches_for_binary_content"></a></h3>
+<p>Extracted text from binary content is only indexed on the parent node of the <tt>@jcr:data property. Use jcr:contains()</tt> on the nt:resource node. Examples:</p>
+
+<div class="source">
+<pre>//element(*, nt:resource)[jcr:contains(., 'foo')]
+//element(*, nt:file)[jcr:contains(jcr:content, 'foo')]
+</pre></div></div>
+<div class="section">
+<h3>Can I use the Lucene field syntax in <tt>jcr:contains()</tt> ?<a name="Can_I_use_the_Lucene_field_syntax_in_jcr:contains_"></a></h3>
+<p>No, you cannot. Even though Jackrabbit uses a Lucene index, the fields for JCR properties do not map 1:1 to Lucene fields. Instead you can use the following:</p>
+
+<div class="source">
+<pre>//element(*, book)[jcr:contains(@title, 'jackrabbit') and jcr:contains(@text, 'query')]
+</pre></div></div>
+<div class="section">
+<h3>My XPath query returns no results when I add a path constraint, what&#x2019;s wrong?<a name="My_XPath_query_returns_no_results_when_I_add_a_path_constraint_whats_wrong"></a></h3>
+<p>You probably forgot to prefix your statement with <i>/jcr:root</i>.</p>
+<p>JSR 170 says in section 6.6.4.3:</p>
+
+<blockquote>
+<p>The context node of an XPath query is the XML node relative to which the query expression is evaluated.</p>
+<p>A relative XPath statement (one that does not have a leading /) will be interpreted relative to the root node of the workspace, which, in the XML document view is the top-most XML element, &lt;jcr:root&gt;. This means that one should not include jcr:root as the first segment in a relative XPath statement, since that element is already the default context node.</p>
+<p>An absolute XPath (one with a leading /), in contrast, will be interpreted relative to a position one level above &lt;jcr:root&gt;. This means that an absolute XPath must either begin with // or with /jcr:root in order to match anything at all.</p>
+</blockquote></div>
+<div class="section">
+<h3>How do I force a consistency check on the search index?<a name="How_do_I_force_a_consistency_check_on_the_search_index"></a></h3>
+<p>Forcing a consistency check may be useful when you think the index is inconsistent. You need to add two parameters to the SearchIndex section in the workspace.xml configuration file:</p>
+
+<div class="source">
+<pre>&lt;param name=&quot;enableConsistencyCheck&quot; value=&quot;true&quot;/&gt;
+&lt;param name=&quot;forceConsistencyCheck&quot; value=&quot;true&quot;/&gt;
+</pre></div>
+<p>Then restart Jackrabbit and watch the log file for possible repair messages. Don&#x2019;t forget to remove the parameters again when you are done.</p></div>
+<div class="section">
+<h3>Why is the size of my query result -1?<a name="Why_is_the_size_of_my_query_result_-1"></a></h3>
+<p>A JCR implementation may return -1 when the size is unknown. Starting with 2.0 Jackrabbit will return -1 for some query statements when there is potential for a more optimized query execution. If you still want a size information you can append an order by clause to your statement. This will force Jackrabbit to calculate the result size.</p></div></div>
+                  </div>
+            </div>
+          </div>
+
+    <hr/>
+
+    <footer>
+            <div class="container-fluid">
+                      <div class="row-fluid">
+                              <p >Copyright &copy;                    2015
+                        <a href="http://www.apache.org/">The Apache Software Foundation</a>.
+            All rights reserved.      
+                    
+      </p>
+        </div>
+
+        
+        
+          
+    
+    
+    <div id="ohloh" class="pull-right">
+      <script type="text/javascript" src="http://www.ohloh.net/p/jackrabbit/widgets/project_users_logo.js"></script>
+    </div>
+        </div>
+    </footer>
+        </body>
+</html>
\ No newline at end of file