James fails to start when JCR Mailbox is used because of incorrect 
spring-beans.xml entries
-------------------------------------------------------------------------------------------

                 Key: JAMES-1116
                 URL: https://issues.apache.org/jira/browse/JAMES-1116
             Project: JAMES Server
          Issue Type: Bug
    Affects Versions: 3.0-M1
            Reporter: Norman Maurer
             Fix For: 3.0-M2


In spring-beans.xml we need to adjust config for JCR Mailbox beans to match M1 
release.

The correct spring config is:

    <bean id="imapCndLoader" 
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
        <property name="targetObject"><ref local="jcrUtils"/></property>
        <property name="targetMethod"><value>registerCnd</value></property>
        <property name="arguments">
            <list>
                <ref local="jcrRepository"/>
                <value>james</value>
                <value>james</value>
                <value>james</value>
            </list>
        </property>
    </bean>

    <bean id="jcrUtils" class="org.apache.james.mailbox.jcr.JCRUtils"/>    

    <bean id ="sessionJcrRepository"    
class="org.apache.james.mailbox.jcr.GlobalMailboxSessionJCRRepository" 
depends-on="imapCndLoader">
        <constructor-arg index="0" ref="jcrRepository"/>
        <constructor-arg index="1" value="james"/>
        <constructor-arg index="2" value="james"/>
        <constructor-arg index="3" value="james"/>
    </bean>
  
    <bean id="nodeLocker" class="org.apache.james.mailbox.jcr.JCRVmNodeLocker"/>


    <bean id="sessionMapperFactory" 
class="org.apache.james.mailbox.jcr.JCRMailboxSessionMapperFactory">
        <constructor-arg index="0" ref="sessionJcrRepository"/>
        <constructor-arg index="1" ref="nodeLocker"/>
    </bean>

    <bean id ="subscriptionManager" 
class="org.apache.james.mailbox.jcr.JCRSubscriptionManager">
        <constructor-arg index="0" ref="sessionMapperFactory"/>
    </bean>

    <bean id="mailboxmanager" 
class="org.apache.james.mailbox.jcr.JCRMailboxManager">
        <constructor-arg index="0" ref="sessionMapperFactory"/>
        <constructor-arg index="1" ref="authenticator"/>
        <constructor-arg index="2" ref="nodeLocker"/>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to