Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-1116

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0-M1
    • 3.0-M2
    • None
    • None

    Description

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

      Attachments

        Activity

          People

            norman Norman Maurer
            norman Norman Maurer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: