jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhihai Liu" <z...@cleverex.com>
Subject JackrabbitSessionFactory in Spring Modules
Date Wed, 20 Feb 2008 20:26:57 GMT
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


      <bean id="jcrSessionFactory"

            <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" />





      <bean id="password" class="java.lang.String">

            <constructor-arg index="0" value="pass" />



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. 


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