Hi all,
I use spring-modules 0.8 with Jackrabbit 1.3.1 (looking forward to upgrading
to 1.4). The spring configuration file defines a JCR session factory like
this.
<bean id="jcrSessionFactory"
class="org.springmodules.jcr.jackrabbit.JackrabbitSessionFactory">
<property name="repository" ref="jcrRepository" />
<property name="workspaceName" value="default" />
<property name="credentials">
<bean class="javax.jcr.SimpleCredentials">
<constructor-arg index="0" value="bogus" />
<constructor-arg index="1">
<bean factory-bean="password"
factory-method="toCharArray" />
</constructor-arg>
</bean>
</property>
</bean>
<bean id="password" class="java.lang.String">
<constructor-arg index="0" value="pass" />
</bean>
As you see, the username and password are sort of hard coded. So it does not
work in a use case regarding to version control: a user login as "johndoe"
(authenticated by RDBMS or LDAP) and updates a node. The session factory has
no idea of "johndoe". All JCR operations are in the name of "bogus". Thus,
the version control history only records "bogus".
I like the convenience provided by spring-modules, such as JcrTemplate and
transaction manager. But how do I create JackrabbitSessionFactory with the
uers' login? Thanks in advance.
Sorry about the previous email. That was sent out by mistake.