Jackrabbit Repository Installation & Configuration

From Gcube Wiki
Jump to: navigation, search

The Apache Jackrabbit content repository is a fully conforming implementation of the Content Repository for Java Technology API.

A content repository is a hierarchical content store with support for structured and unstructured content, full text search, versioning, transactions, observation, and more.

This document describes how to setup a Jackrabbit content repository in the Web-Application Bundle deployment model. The instructions in this document apply to Tomcat versions 5.x and 6.x. It should be easy to modify the instructions for other container environments.

Configuration Overview

All you need to do is the following:

If web-application deployment is successful, pointing you browser to jackrabbit-webapp-<version> you can see the follow page:


Use this URL http://localhost:8080/jackrabbit-webapp-patched-<version>/repository/default/ to access the content repository in your WebDAV client.

The server asks for authentication, username and password are provided as init parameters in web.xml file for RepositoryStartup servlet.

An other parameter you can set is the repository-path, the path where the jackrabbit repository will be installed. The web-app will use these parameters at deployment time.

Repository Configuration

Jackrabbit's main configuration lies in the so-called repository.xml file. It contains global configuration such as Login and Access Management, Versioning or Clustering. Then it defines how the actual data for a certain workspace should be stored by choosing a PersistenceManager and what search/query implementation to use by defining a SearchIndex.

Node Type Registry

Each Jackrabbit instance has a NodeTypeRegistry which is created on start-up and populated with the set of built-in node types.

Node types are defined in /jackrabbit/repository/nodetypes/custom_nodetypes.xml using the "Compact Namespace and Node Type Definition" (CND) notation, then register them using the JackrabbitNodeTypeManager.

The custom_nodetypes.xml file defines:

  • Which node types are supported in the repository.
  • The definition of a supported node type.
  • The node type of a node.
  • The definition of an item in the node type of its parent.

<mix = 'http://www.jcp.org/jcr/mix/1.0'>
<nt = 'http://www.jcp.org/jcr/nt/1.0'>
<nthl = 'http://ip-server:port/hl/nthl'>
<hl = 'http://ip-server:port/hl'>
[nthl:user] > nt:base
  - hl:portalLogin (String) mandatory
  - hl:uuid (String) mandatory
  - hl:scope (String)
[nthl:applicationData] > mix:lastModified,mix:referenceable,nt:base
  - hl:type (String) mandatory
  - hl:data (binary) mandatory
[nthl:home] > nt:folder
  - hl:scopes (String) multiple
[nthl:accountingEntryRead] > nt:base
  - hl:user (String)
  - hl:date	(Date) mandatory
  - hl:itemName (String)
[nthl:accountingEntry] > nt:base
  - hl:user (String) mandatory
  - hl:date	(Date) mandatory
[nthl:accountingEntryPaste] > nthl:accountingEntry
  - hl:fromPath (String) mandatory
[nthl:accountingEntryUpdate] > nthl:accountingEntry
  - hl:itemName (String) mandatory
[nthl:accountingFolderEntryRenaming] > nthl:accountingEntry
  - hl:oldItemName (String) mandatory
[nthl:accountingFolderEntryRemoval] > nthl:accountingEntry
  - hl:itemType (String) mandatory
  - hl:folderItemType (String) 
  - hl:itemName (String) mandatory
  - hl:mimeType (String) 
[nthl:accountingFolderEntryCut] > nthl:accountingFolderEntryRemoval   
[nthl:accountingFolderEntryAdd] > nthl:accountingFolderEntryRemoval  
[nthl:accountingSet] > nt:base
  + * (nthl:accountingEntry)

Remote Access

Jackrabbit supports remote access using DavEx (WebDAV with JCR extensions, since Jackrabbit 2.0) and an RMI layer called JCR-RMI. Jackrabbit 2.0 supports the DavEx protocol through the Jackrabbit WebDAV server included in the Jackrabbit web application and the Standalone Server. The web application exposes the DavEx interface at http://<server>/<context>/server and the standalone server by default at http://localhost:8080/server.