jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Podatelev <brightnesslev...@gmail.com>
Subject Jackrabbit + JDBC with JTA
Date Thu, 19 Mar 2009 15:15:17 GMT

I'm developing an application using Spring and Jackrabbit, and currently in
the situation where I need transactions distributed across Jackrabbit repo &
MySQL database.
I'm not very experienced in the area, so the best I have achieved by far is
a JTA-enabled Jackrabbit transactions driven by Jencks. Obviously, I was
following the example found in springmodules-jcr as I couldn't find anything
better anywhere on the web. However, it seems really outdated, as it hasn't
been updated for at least four years. Since then, Jencks has upgraded to 2.0
and since that update, Jencks website hasn't been showing any signs of

The problem with the Jencks 1.3 is that I couldn't manage to properly
configure JDBC datasource that would be aware of the transactionManager I am

I tried to upgrade to 2.0, but it doesn't have all the dependencies included
(specifically, those related to Geronimo), and I haven't yet figured out,
where to find all required Geronimo's 1.2-beta jars as Jencks 2.0 states it
depends on Geronimo 1.2. (the Maven mystery is still beyond me)

I also tried JOTM and Atomikos, but as far as I understand, the only way to
achieve JTA transactions with Jackrabbit is to configure it with(as?) a JCA
adapter, which looks like this:

  <bean id="repository"
      <property name="managedConnectionFactory"><ref
      <property name="connectionManager"><ref

    <bean id="repositoryManagedConnectionFactory"
        <property name="homeDir" value="/var/jackrabbit2"/>
        <property name="configFile" value="/var/jackrabbit2/repository.xml"

In the "repository" bean, "connectionManager" property must be provided to
make the LocalConnectionFactoryBean aware of transaction management, but I
couldn't find anything that looked like connection manager neither in JOTM
nor in Atomikos distributions.

At this point, I have two options: try to proceed with Jenks (which for 1.3
means find a way to configure JDBC datasource properly, and for 2.0 means
find all dependencies and configure transaction manager properly), which I
am not sure is a good thing as it seems to be abandoned or go somewhat
deeper into Spring wiring details and try to adapt JOTM or Atomikos.

I do understand that it is my responsibility to find the answer, but I find
it a bit strange that there is actually not one working example of JDBC+JCR
distributed transactions, and if someone could share with me the way to
configure this, or at least somehow point me in the right direction, that
would be just terrific. There are in fact a lot of questions and requests of
this kind on springforums.org, but I didn't find a single working solution.



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message