You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by Apache Wiki <wi...@apache.org> on 2010/03/15 18:41:18 UTC

[Jackrabbit Wiki] Update of "JackrabbitOnJBoss" by JukkaZitting

Dear Wiki user,

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

The "JackrabbitOnJBoss" page has been changed by JukkaZitting.
The comment on this change is: Update JBoss deployment instructions.
http://wiki.apache.org/jackrabbit/JackrabbitOnJBoss?action=diff&rev1=29&rev2=30

--------------------------------------------------

  Custom access manager when using Jboss for security is referenced at SimpleJbossAccessManager
  
  === Deploy Jackrabbit with JCA ===
+  1. If you have not done so already, [[http://jcp.org/aboutJava/communityprocess/final/jsr283/index.html|download]] the JCR 2.0 specification.
+  1. Copy the jcr-2.0.jar from the specification package to {{{$JBOSS_HOME/common/lib}}} (or {{{$JBOSS_HOME/server/default/lib}}} in JBoss 4.x). 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.
+  1. Download the latest [[http://jackrabbit.apache.org/downloads.html|Jackrabbit JCA archive]] and deploy it either through the JBoss console or by placing it in the {{{deploy}}} folder.
+  1. Download the latest [[http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-jca/deploy/jboss/jcr-ds.xml|jcr-ds.xml]] template file
+  1. Edit the template to match your environment:
+    * Change the {{{rar-name}}} setting to match the actual name of the jackrabbit-jca RAR file you downloaded and deployed above
-  * Checkout a tagged jca-connector release with subversion. For example, from http://svn.apache.org/repos/asf/jackrabbit/tags/1.2.3/jackrabbit-jca/.
-  * If you have not done so already, download the jcr library from sun at http://jcp.org/aboutJava/communityprocess/final/jsr170/index.html. 
-    Install the jar in your maven repository (type mvn install and follow the instructions in the error message).
-  * Edit the pom.xml and add the a dependency for javax.jcr, jcr, version 1.0 with a scope of provided. 
-    This will prevent maven from including it in the rar, but will still download it.
-  * Build the rar file. type "mvn install"
-  * Copy jcr-1.0.jar from your maven 2 repository (~/.m2/repository) to the jboss lib folder
-    [jboss]/server/default/lib.
-    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
-    * get template from sources or download via web svn:  http://svn.apache.org/repos/asf/jackrabbit/trunk/
-    * edit [jackrabbit-jca]/deploy/jboss/4.x/jcr-ds.xml
-    * change the "homeDir" property to match the folder where you want 
+    * Change the {{{homeDir}}} property to match the folder where you want Jackrabbit to store its files
+  1. Deploy the resulting {{{jcr-ds.xml}}} file to JBoss
-      jackrabbit to store its files.
-    * Change the rar file name to match actual. (<rar-name>jackrabbit-jca-1.1-SNAPSHOT.rar</rar-name>)
-    * copy the jcr-ds to the deploy folder in jboss
  
- Now, jackrabbit is running and available through JNDI at java:jcr/local. 
+ Now, jackrabbit is running and available through JNDI at {{{java:jcr/local}}} (or whatever other JNDI name you specified). 
  
-  Code snippet to lookup the local repository
+ Code snippet to lookup the local repository:
-    InitialContext ctx = new InitialContext() ;
  
+ {{{#!java
-    Repository repo = (Repository) ctx.lookup("java:jcr/local") ;
+ Repository repo = (Repository) new InitialContext().lookup("java:jcr/local");
+ }}}
  
  === Expose the local repository through RMI ===
  
-  * download jcr-rmi from svn (at http://svn.apache.org/repos/asf/jackrabbit/tags/1.2.3/jackrabbit-jcr-rmi for example) and build it.
+  * download jcr-rmi from svn (at http://svn.apache.org/repos/asf/jackrabbit/tags/2.0.0/jackrabbit-jcr-rmi for example) 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-webapp from http://svn.apache.org/repos/asf/jackrabbit/tags/1.2.3/jackrabbit-webapp
+  * build or download jcr-webapp from http://svn.apache.org/repos/asf/jackrabbit/tags/2.0.0/jackrabbit-webapp
-  * remove jcr-1.0.jar from the war.
   * configure jcr-webapp to connect to the local repository. see [[attachment:web.xml]]
     * 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-webapp-1.2.3.war to the deploy folder in jboss as jackrabbit-server.war
+  * copy jackrabbit-webapp-2.0.0.war to the deploy folder in jboss as jackrabbit-server.war
  
  Now the webdav server is running at http://localhost:8080/jackrabbit-server