Return-Path: X-Original-To: apmail-jackrabbit-commits-archive@www.apache.org Delivered-To: apmail-jackrabbit-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 27E55E36F for ; Mon, 31 Dec 2012 12:41:30 +0000 (UTC) Received: (qmail 10045 invoked by uid 500); 31 Dec 2012 12:41:30 -0000 Delivered-To: apmail-jackrabbit-commits-archive@jackrabbit.apache.org Received: (qmail 10016 invoked by uid 500); 31 Dec 2012 12:41:30 -0000 Mailing-List: contact commits-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list commits@jackrabbit.apache.org Received: (qmail 10008 invoked by uid 99); 31 Dec 2012 12:41:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Dec 2012 12:41:29 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Dec 2012 12:41:26 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 30A9C2388C06; Mon, 31 Dec 2012 12:40:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1427110 [16/18] - in /jackrabbit/site/trunk/content/JCR: ./ a-simple-ocm-project-with-maven-eclipse.data/ concurrency-control.data/ deployment-models.data/ how-jackrabbit-works.data/ how-to-map-associations-between-objects.data/ index-read... Date: Mon, 31 Dec 2012 12:40:13 -0000 To: commits@jackrabbit.apache.org From: jukka@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121231124019.30A9C2388C06@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: jackrabbit/site/trunk/content/JCR/repository-server-howto.html URL: http://svn.apache.org/viewvc/jackrabbit/site/trunk/content/JCR/repository-server-howto.html?rev=1427110&view=auto ============================================================================== --- jackrabbit/site/trunk/content/JCR/repository-server-howto.html (added) +++ jackrabbit/site/trunk/content/JCR/repository-server-howto.html Mon Dec 31 12:40:09 2012 @@ -0,0 +1,165 @@ + + + + + + + Repository Server HOWTO + + + +
+ +
+ +
+

Repository Server HOWTO

+

This document describes how to use a Jackrabbit content repository in the deployment model 3: The Repository Server. In this deployment model, a separate repository server is running outside the virtual machine the client application is running in. A repository server can serve multiple applications running on separate JVMs on separate network hosts. See the JCR client application HOWTO for instructions on how to use the configured content repository server.

+ +

Note that JCR specification defines no standard communication protocol for inter-JVM repository access, and that Jackrabbit supports no such protocol by default. However, Jackrabbit contains tools for using JCR content repositories over the RMI and WebDAV protocols (see the jcr-rmi and the jcr-server, webapp packages).

+ +

This how-to contains instructions for accessing a JCR-RMI server in Tomcat versions 4.x and 5.x. It should be easy to modify the instructions for other container environments and communication protocols.

+ +

In addition to the following the instructions in this document, you also need to have an already running JCR-RMI server. See the JCR-RMI javadocs for instructions on how to setup such a server.

+ +

Warning: The current JCR-RMI library is designed for simplicity, not performance. You will probably experience major performance issues if you try running any non-trivial applications on top of JCR-RMI.

+ +

Tomcat instructions

+ +

Follow the steps below to setup a model 3 JCR-RMI client deployment for your web application in Tomcat 4.x or 5.x. Example code for both versions of Tomcat is included after this overview.

+ +

Note that these instructions closely follow the Model 1 HOWTO instructions. By making similar changes (change the factory class and parameters of the repository) to the Model 2 HOWTO instructions, you can setup a shared JCR-RMI client deployment for all applications in the container.

+ +
    +
  1. Place the JCR-RMI jar file and its dependencies (including the JCR API jar) under Tomcat folder/webapps/your app/WEB-INF/lib.
  2. +
  3. Register the JCR-RMI client repository factory in the context scope.
  4. +
+ + +

Step 2 - Context configuration

+ +

In Tomcat 4.x and 5.0, add the following snippet in server.xml under the Context element of your web application.

+ +
+
+<Resource name="jcr/repository"
+          auth="Container"
+          type="javax.jcr.Repository"/>
+
+<ResourceParams name="jcr/repository">
+  <parameter>
+    <name>factory</name>
+    <value>org.apache.jackrabbit.rmi.client.ClientRepositoryFactory</value>
+  </parameter>
+  <parameter>
+    <name>url</name>
+    <value>[The RMI URL of the repository]</value>
+  </parameter>
+</ResourceParams>
+
+
+ +

In Tomcat 5.5, add the following snippet in your application's context.xml file (or in the server.xml file if you prefer central configuration).

+ +
+
+<Resource name="jcr/repository"
+          auth="Container"
+          type="javax.jcr.Repository"
+          factory="org.apache.jackrabbit.rmi.client.ClientRepositoryFactory"
+          url="[The RMI URL of the repository]"/>
+
+
+
+
+
+ +
+ + + + +