8 Comments

  1. Marsha says:

    February 18, 2010 at 1:54 PM

    Thanks. I’ve been using the “straightforward” import method and have been uneasy about it the whole time though I couldn’t pinpoint why (the import method has done well for us so far but probably because our webapp is small right now) . Your post gives me some things to think about and redesign before we grow the webapp and get stuck in an import dilemma.

  2. says:

    March 5, 2012 at 12:33 AM

    I’ve tried this technique with success, with the parent being an “EJB” (jar) and child being a war. Where I got stuck however is when it came to the need for the resource-ref’ed datasource defined in the war being usable by the EJB.

  3. rkb says:

    March 15, 2012 at 5:22 AM

    This is brilliant idea, but doesot work for scenario below.

    So you load the PropertyPlaceholderConfigurer context xml at the parentRootContext.

    These properties are not available to the application context that are not part of the parentRootContext, in case of multiple context roots.

    • says:

      April 15, 2012 at 10:34 PM

      PropertyPlaceholderConfigurer only works for a single applicationContext layer, this could be useful for some scenarios and unuseful for others.

  4. kmc says:

    September 18, 2013 at 12:58 PM

    How would you apply this solution when not using Spring application context XMLs and instead use AnnotationConfigWebApplicationContext coupled with ApplicationContextInitializer?

Leave a Reply

Your email address will not be published. Required fields are marked *