Hi. I'm trying to deploy a jackrabbit 2.2.7 rar into jboss 7.1.0.Alpha.
I was wondering about other's success or otherwise.
I have got it to work but have had to include the HomeDir and ConfigFile
parameters in the ra.xml file inside the rar file. If I put them into the
connection-definition section of the jboss standalone.xml configuration file
then the repository paths are corrupted.
To get the rar deployed and working I had to do the following 5 steps:
1) add a dependencies line to the MANIFEST.MF file in the rar
> Dependencies: javax.jcr export,org.slf4j
2) create a javax.jcr module in jboss with the jcr 2.0 jar file in it.
3) delete the two logback jar files from the rar so logging goes directly to
jboss logging
4) Add my repository paths to the ra.xml file (my repository is a bundleDB repo)
> <resourceadapter>
> ...
> <outbound-resourceadapter>
> <connection-definition>
> ...
> <config-property>
> <config-property-name>HomeDir</config-property-name>
> <config-property-type>java.lang.String</config-property-type>
>
> <config-property-value>/Users/bwallis/InfoMedix/JBoss/jboss-as-7.1.0.Alpha1-SNAPSHOT/repository</config-property-value>
> </config-property>
> <config-property>
> <config-property-name>ConfigFile</config-property-name>
> <config-property-type>java.lang.String</config-property-type>
>
> <config-property-value>/Users/bwallis/InfoMedix/JBoss/jboss-as-7.1.0.Alpha1-SNAPSHOT/repository/repository.xml</config-property-value>
> </config-property>
5) configure the rar in the jboss standalone.xml file
> <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
> <resource-adapters>
> <resource-adapter>
> <archive>
> jackrabbit-jca-2.2.7.rar
> </archive>
> <transaction-support>
> XATransaction
> </transaction-support>
> <connection-definitions>
> <connection-definition
>
> class-name="org.apache.jackrabbit.jca.JCAManagedConnectionFactory"
> jndi-name="java:/jca/DocumentStore" enabled="true"
> use-java-context="true"
> pool-name="jackrabbit-jca-2_2_7_rar-Pool" use-ccm="true">
> </connection-definition>
> </connection-definitions>
> </resource-adapter>
> </resource-adapters>
> </subsystem>
With these changes it all works OK in JBoss, I can access the repository and
store and retrieve nodes. (I've only played with a transient one so far)
But, If I try to configure the repository parameters in the resource adapter
definition in standalone.xml I get a strange error...
My updates to jboss's standalone.xml file are the addition of the
config-property elements for HomeDir and ConfigFile below to override the
values in the rar file.
> <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">
> <resource-adapters>
> <resource-adapter>
> <archive>
> jackrabbit-jca-2.2.7.rar
> </archive>
> <transaction-support>
> XATransaction
> </transaction-support>
> <connection-definitions>
> <connection-definition
>
> class-name="org.apache.jackrabbit.jca.JCAManagedConnectionFactory"
> jndi-name="java:/jca/DocumentStore" enabled="true"
> use-java-context="true"
> pool-name="jackrabbit-jca-2_2_7_rar-Pool" use-ccm="true">
> <config-property name="HomeDir">
>
> /Users/bwallis/InfoMedix/JBoss/jboss-as-7.1.0.Alpha1-SNAPSHOT/repository
> </config-property>
> <config-property name="ConfigFile">
>
> /Users/bwallis/InfoMedix/JBoss/jboss-as-7.1.0.Alpha1-SNAPSHOT/repository/repository.xml
> </config-property>
> </connection-definition>
> </connection-definitions>
> </resource-adapter>
> </resource-adapters>
> </subsystem>
and on usage I get the following error
> 17:21:28,273 INFO [org.apache.jackrabbit.core.config.RepositoryConfig]
> (http--127.0.0.1-8080-1) Copying configuration from
> vfs:/content/jackrabbit-jca-2.2.7.rar/jackrabbit-core-2.2.7.jar/org/apache/jackrabbit/core/repository.xml
> to ("ConfigFile" =>
> "/Users/bwallis/InfoMedix/JBoss/jboss-as-7.1.0.Alpha1-SNAPSHOT/repository/repository.xml")
> 17:21:28,274 WARN
> [org.jboss.jca.core.connectionmanager.pool.strategy.PoolByCri]
> (http--127.0.0.1-8080-1) IJ000604: Throwable while attempting to get a new
> connection: null: javax.resource.ResourceException: Failed to create session:
> Automatic repository configuration failed:
> {org.apache.jackrabbit.repository.home=("HomeDir" =>
> "/Users/bwallis/InfoMedix/JBoss/jboss-as-7.1.0.Alpha1-SNAPSHOT/repository"),
> org.apache.jackrabbit.repository.conf=("ConfigFile" =>
> "/Users/bwallis/InfoMedix/JBoss/jboss-as-7.1.0.Alpha1-SNAPSHOT/repository/repository.xml"),
> rep.home=("HomeDir" =>
> "/Users/bwallis/InfoMedix/JBoss/jboss-as-7.1.0.Alpha1-SNAPSHOT/repository")}
Note that the path it is using are not just the path but the full string
("name" => "path")
I even get a directory created with the name
> ("HomeDir" => "
so it is trying to initialise a new repository based on the string it is
reporting.
thanks
brian wallis...