title: Is it possible to set a resource property value inside applicationcontext?
body: <p>In an applicationcontext.xml, is it possible to set a value which can be used later in SPEL expressions?</p>
  
  <p>For example is there a way to do this?:</p>
  
  <pre><code>&lt;setProperty name="foo" value="someval" /&gt;
  
  
  &lt;bean id="beanId" name="beanName" class="SomeClass"&gt;
      &lt;property name="someVal" value="blah_${foo}"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>The actual reason I want to do this is that I use  statements to create entity managers which are used in many different application contexts. The problem is that the entity managers require a unique name which is used by Bitronix to create a local file which breaks if multiple unit tests run at the same time using the same name for that field. To set that unique name I currently have a separate properties file for each application context and import it to get a unique name from it.</p>
  
  <p>Rather than doing that nonsense I'd rather just do this:</p>
  
  <pre><code>&lt;setProperty name="uniqueName" value="someUniqueName" /&gt;
  &lt;import resource="classpath*:shared/db/fooDb.xml" /&gt;
  </code></pre>