Results 1 to 4 of 4

Thread: 'Aggregating' an ApplicationContext

Hybrid View

  1. #1
    Join Date
    Aug 2004
    Location
    columbia, md
    Posts
    12

    Default '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,
    sinclair

  2. #2
    Join Date
    Aug 2004
    Location
    u.s.a
    Posts
    399

    Default

    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

  3. #3
    Join Date
    Aug 2004
    Location
    u.s.a
    Posts
    399

    Default

    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?

  4. #4
    Join Date
    Aug 2004
    Location
    columbia, md
    Posts
    12

    Default

    Looks like this works as you say.

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

    Thanks for your help!
    sinclair

Similar Threads

  1. problems loading applicationcontext
    By andrea_z in forum Web
    Replies: 6
    Last Post: Feb 8th, 2006, 08:25 AM
  2. Replies: 2
    Last Post: Oct 13th, 2005, 09:58 AM
  3. Replies: 4
    Last Post: Jun 8th, 2005, 06:22 AM
  4. Obtaining ApplicationContext for web and batch apps
    By Thomas Vaught in forum Container
    Replies: 10
    Last Post: May 23rd, 2005, 07:09 AM
  5. TransactionProxyFactory and ApplicationContext
    By newToSpring in forum Container
    Replies: 9
    Last Post: Oct 18th, 2004, 03:45 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
  •