jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Jackrabbit Wiki] Update of "JackrabbitInJBoss" by edgarpoce
Date Mon, 26 Jun 2006 20:26:34 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jackrabbit Wiki" for change notification.

The following page has been changed by edgarpoce:

New page:
This document describes how to 
 * Deploy Jackrabbit with JCA.
 * Expose the local repository through JNDI and WEBDAV to remote clients.
 * Connect remotely from a java program, or from a command line tool (contrib/jcr-commands).

Feel free to make changes to this document.

=== Deploy Jackrabbit with JCA ===
 * checkout jca-connector with subversion
 * build the rar file. type "maven rar:rar"
 * remove jcr-1.0.jar from the generated rar and move it to the jboss lib folder
   Remember that you must not include the jcr jar in any local client application
   at the risk of getting ClassCastExceptions when trying to access the repository 
   through JNDI.
 * copy the generated rar file to the deploy folder in jboss.
 * customize a jackrabbit datasource
   * edit [jackrabbit-jca]/deploy/jboss/4.x/jcr-ds.xml
   * change the "homeDir" property to match the folder where you want 
     jackrabbit to store its files.
   * copy the jcr-ds to the deploy folder in jboss

Now, jackrabbit is running and available through JNDI at java:jcr/local. 

 Code snippet to lookup the local repository
   InitialContext ctx = new InitialContext() ;

   Repository repo = (Repository) ctx.lookup("java:jcr/local") ;

=== Expose the local repository through RMI ===

 * download jcr-rmi from svn and build it.
 * copy the generated jar to the jboss deploy folder.

Now a JCR RMI server is running at jnp://localhost:1099/jcrServer

=== Expose the local repository through Webdav ===
 * build or download jcr-server
 * remove jcr-1.0.jar from the war.
 * configure jcr-server to connect to the local repository
   * disable repository startup servlet in web.xml.
   * Change the JNDI Name.
     It must match the jndi-name set in jcr-ds.xml. default is "java:jcr/local"
   * disable JNDI environment variables for creating the initial context.
 * copy jackrabbit-server.war to the deploy folder in jboss

Now the webdav server is running at http://localhost:8080/jackrabbit-server

=== Accessing the repository remotely from the command line interface ===
 * checkout jcr-commands from subversion
 * build with "maven jar:jar"
 * unzip the generated zip file at ./target into a folder of your choice
 * copy jboss client libraries into the lib folder. 
   e.g. copy the file [jboss]/client/jbossall-client.jar to [jcr-commands]/lib
 * run the command line with the script at bin/run.bat
 * connect to the remote server. command: "jndi jcrServer".
 * login to the remote repository. command: "login [user] [password]".
 * type "help" to view the available commands.
 * type "help [command name]" for a detailed description of the given command.

View raw message