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

Make configuration prefix configurable in ConfigurationProviderImpl

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Abandoned
    • 3.0-beta3
    • None
    • Spring Container

    Description

      I have been trying to run Apache James with default configuration from within a Java "main" method in a Maven Repo. After progressing with keeping configurations in classpath (spring context xmls) and file system (rest of the conf files from distribution placed in ../conf/ dir relative to current working dir) successfully.Now I tried changing the paths and successfully did so in the context xml. Then I stumbled across the following exception:

      org.apache.commons.configuration.ConfigurationException: Unable to load configuration for component mailetcontainer.processors
      at org.apache.james.container.spring.lifecycle.ConfigurationProviderImpl.getConfiguration(ConfigurationProviderImpl.java:144)
      at org.apache.james.container.spring.lifecycle.ConfigurationProviderImpl.afterPropertiesSet(ConfigurationProviderImpl.java:90)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)

      After looking into the code I saw the following file where configuration prefix is hard coded to - 'file://conf/'.
      http://grepcode.com/file/repo1.maven.org/maven2/org.apache.james/james-server-lifecycle-spring/3.0-beta3/org/apache/james/container/spring/lifecycle/ConfigurationProviderImpl.java#ConfigurationProviderImpl.getConfiguration%28java.lang.String%29

      I want to make it configurable so that it can be changed if and as required.

      Attachments

        Activity

          People

            Unassigned Unassigned
            imyousuf Imran M Yousuf
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: