title: Adding a Pre-constructed Bean to a Spring Application Context
body: <p>I am writing a class that implements the following method:</p>
  
  <pre><code>public void run(javax.sql.DataSource dataSource);
  </code></pre>
  
  <p>Within this method, I wish to construct a Spring application context using a configuration file similar to the following:</p>
  
  <pre><code>&lt;bean id="dataSource" abstract="true" /&gt;
  
  &lt;bean id="dao" class="my.Dao"&gt;
    &lt;property name="dataSource" ref="dataSource" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Is it possible to force Spring to use the DataSource object passed to my method wherever the "dataSource" bean is referenced in the configuration file?</p>