|
|
Here are step by step directions on how to configure Jackrabbit to JBoss AS 7.
1. Create directory for the jcr deployment
$ cd $JBOSS_HOME/modules
$ mkdir -p javax/jcr/main
$ vi module.xml<module xmlns="urn:jboss:module:1.0" name="javax.jcr">
<dependencies>
<module name="javax.transaction.api" export="true"/>
</dependencies>
<resources>
<resource-root path="jcr-2.0.jar"/>
<!-- Insert resources here -->
</resources>
</module>Download jackrabbit-jca-x.x.x.rar and un-package rar file and change
META-INF/MANIFEST.MF file by adding the following code snippet for dependency at the end of the file.
Dependencies: javax.jcr export,org.slf4Copy the rar file to deployment folder and start the JBoss [it should start without any error]
If JBoss starts without any error then Stop the JBoss and add the resource adapter in
$ vi $JBOSS_HOME/standalone/configuration/standalone.xml<subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"> <resource-adapters>
<resource-adapter>
<archive>
jackrabbit-jca-x.x.x.rar
</archive>
<transaction-support>
XATransaction
</transaction-support>
<connection-definitions>
<connection-definition class-name="org.apache.jackrabbit.jca.JCAManagedConnectionFactory" jndi-name="jcrJCA" enabled="true" use-java-context="true" pool-name="jackrabbit-jca-x.x.x_rar-Pool" use-ccm="true">
<config-property name="configFile">
/configuration/repository.xml
</config-property>
<config-property name="bindSessionToTransaction">
true
</config-property>
<config-property name="homeDir">
/configuration/repository
</config-property>
</connection-definition>
</connection-definitions>
</resource-adapter>
</resource-adapters>Restart JBoss and see rar deployment got succeeded.