Announcement Announcement Module
Collapse
No announcement yet.
'Aggregating' an ApplicationContext Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 'Aggregating' an ApplicationContext

    Hi !
    Is it possible to do the following or must each sub-context be explicitly added to the constructor arg list ?

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans 
    			PUBLIC "-//SPRING//DTD BEAN//EN" 
    			"http&#58;//www.springframework.org/dtd/spring-beans.dtd">
    <beans >
    
    	<!-- define an aggregate application context -->
    	<bean id="my.layer.context" class="org.springframework.context.support.ClassPathXmlApplicationContext">
    		<constructor-arg>
    			<list>
    				<value>a/b/c/**/applicationContext.xml</value>
    			</list>
    		</constructor-arg>
    	</bean>
    </beans>
    Tests have proved unsuccessful (i.e. it cannot be done) however I am just confirming with the community.

    Hopefully,

  • #2
    My gut feel is no, can't be done.

    Imagine a softlink in one of the subdirectories, and the link points to a pitabyte store; wonder how perf will be impacted.

    I'm waiting for 'yes, Spring can do that'. :P

    Comment


    • #3
      Oops, responded too quick. Seems that since 1.1 rc1 there is an Ant style loading of 'globed' resources.

      but only with the psuedo 'classpath:' protocol?

      Comment


      • #4
        Looks like this works as you say.

        On testing again I got the results I had hoped for !!

        Thanks for your help!

        Comment

        Working...
        X