Results 1 to 3 of 3

Thread: setup commons-configuration as spring context bean

  1. #1
    Join Date
    Jan 2005
    Posts
    144

    Default setup commons-configuration as spring context bean

    Hello,

    I'm trying to configure in my Spring context a commons-configuration "CompositeConfiguration".

    I can setup a simple Configuration instance using :
    Code:
    <bean id="aSimpleConfig" class="org.apache.commons.configuration.PropertiesConfiguration"
    		init-method="load">
    		<property name="URL">		
    			<value>classpath&#58;/org/springframework/context/support/messages.properties</value>
    		</property>
    	</bean>
    I'd like to setup a CompositeConfiguration (that merges multiple Configuration instances) but it requires to call "addConfiguration(config)" for every configuration instance to set in the composite. I don't know how to do this using IoC syntax (perhaps it's out of scope).

    Has someone used compositeConfiguration with Spring ? Should I ask commons-configuration developers to add a "setConfigList(List)" to the compositeConfiguration class to be useable in a IoC context ?

    Nico.

  2. #2
    Join Date
    Oct 2004
    Location
    Herndon, VA, US
    Posts
    648

    Default

    A couple of workarounds were given at the end of this discussion: http://forum.springframework.org/showthread.php?t=13060
    Last edited by robyn; May 16th, 2006 at 04:17 AM.
    --Jing Xue

  3. #3
    Join Date
    Jan 2005
    Posts
    144

    Default

    I've submited issue http://opensource.atlassian.com/proj...rowse/SPR-1018 about this, using "iterative" injection suggested in the thread you pointed me to.

Similar Threads

  1. Spring container fails with no exception
    By naor in forum Container
    Replies: 9
    Last Post: Oct 1st, 2005, 03:39 PM
  2. EHCaching Hibernate
    By dencamel in forum Data
    Replies: 3
    Last Post: Sep 6th, 2005, 09:03 PM
  3. Stack Overflow
    By rayho222 in forum Container
    Replies: 6
    Last Post: May 17th, 2005, 03:42 AM
  4. could not satisfy dependencies
    By springuser in forum Container
    Replies: 4
    Last Post: Apr 26th, 2005, 01:15 PM
  5. Replies: 1
    Last Post: Apr 25th, 2005, 07:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •