This document describes how to use a Jackrabbit content repository in the deployment model 2: Shared J2EE Resource. In this deployment model, a central content repository resource managed by an application server is used by multiple different applications. See the JCR client application HOWTO for instructions on how to use the configured content repository.
This how-to contains instructions for Tomcat versions 4.x and 5.x. It should be easy to modify the instructions for other container environments.
Follow the steps below to setup a model 2 Jackrabbit deployment for your Tomcat 4.x or 5.x installation. Example code for both versions of Tomcat is included after this overview.
[Tomcat folder]/common/lib
.
Note: This step is essentially the same as step 2 in the Model 1 HOWTO. The only differences are in the (arbitrary) naming of the resource and placing of the configuration elements. The difference in the end result is that the configured repository is bound to the global JNDI context instead of a local one.
In Tomcat 4.x and 5.0, add the following snippet in
server.xml
under the GlobalNamingResources
element.
In Tomcat 5.5, add the following snippet in server.xml
under the GlobalNamingResources
element.