<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    <div class="moz-cite-prefix">On 5/8/14 3:16 PM, Cantor, Scott wrote:<br>
    </div>
    <blockquote cite="mid:CF915027.C825%25cantor.2@osu.edu" type="cite">
      <pre wrap="">

The question I guess is partly whether properties inherit or not.</pre>
    </blockquote>
    <br>
    Just spend some more time looking at this.&nbsp; I'm pretty sure they do
    effectively inherit.&nbsp; Looks like in general when
    ConfigurableApplicationContext#setParent(parentContext), this code
    from AbstractApplicationContext is called:<br>
    <br>
    <br>
    <tt>public void setParent(ApplicationContext parent) {</tt><tt><br>
    </tt><tt>&nbsp;&nbsp;&nbsp; this.parent = parent;</tt><tt><br>
    </tt><tt>&nbsp;&nbsp;&nbsp; if (parent != null) {</tt><tt><br>
    </tt><tt>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Environment parentEnvironment =
      parent.getEnvironment();</tt><tt><br>
    </tt><tt>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (parentEnvironment instanceof
      ConfigurableEnvironment) {</tt><tt><br>
    </tt><tt>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
      getEnvironment().merge((ConfigurableEnvironment)
      parentEnvironment);</tt><tt><br>
    </tt><tt>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }</tt><tt><br>
    </tt><tt>&nbsp;&nbsp;&nbsp; }</tt><tt><br>
    </tt><tt>}</tt><br>
    <br>
    All the extant ApplicationContexts impls extend
    AbstractApplicationContext.<br>
    <br>
    All the extant Environment impls are also ConfigurableEnvironment,
    so the merge() happens.<br>
    <br>
    From its Javadoc, the merge() amongst other things merges the
    PropertySource instances from the parent into the child's
    Environment (unless ones with the same name already exist in the
    child, in which case that child property source instance is
    preserved).&nbsp; <br>
    <br>
    Only potential issue I see is that if the parent Environment changes
    *after* setParent is called on the child, it won't pick up those
    changes:<br>
    <br>
    <tt>&nbsp;Note that any changes to</tt><tt><br>
    </tt><tt>&nbsp;the parent environment occurring after the call to {@code
      merge} will not be</tt><tt><br>
    </tt><tt>&nbsp;reflected in the child. Therefore, care should be taken to
      configure parent</tt><tt><br>
    </tt><tt>&nbsp;property sources and profile information prior to calling
      {@code merge}.</tt><br>
    <br>
    <br>
    But I doubt that's an issue here.<br>
  </body>
</html>