title: How to use DatabaseConfiguration from apache commons with a properties file configures datasource name
body: <p>I am moving our config properties from a properties file to a database using apache commons DatabaseConfiguration.  Works fine.  However, it obviously needs  database definition, and I want to load that with a jndi datasource name that is itself a property.  So I want to keep a property file with that property and one or two others, that would load first and get used by the database configuration.</p>
  
  <p>I have tried about a million permutations and I can't seem to get it to work.  If I hardcode the jndi name in the spring config, it works, but whether I include both in the same property configurator or separate ones, whether I use the order property or not...nothing seems to work.</p>
  
  <p>Here's one of my iterations that didn't work:</p>
  
  <pre><code>&lt;bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt;
      &lt;property name="location" value="/WEB-INF/esp.properties" /&gt;
      &lt;property name="order" value="10" /&gt;
  &lt;/bean&gt;
  &lt;bean id="propertyConfigurer2" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"&gt;
      &lt;property name="order" value="20" /&gt;
      &lt;property name="properties" ref="dbConfigFactory" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>dbConfigFactory there is the factory that includes the databaseconfiguration bean.  Does anyone know how to do this?</p>