title: Exposing jndi variables as property place holder
body: <p>I have a jar containing a spring configuration. I am retrieving some JNDI variables to configure web service addresses inside the jar. Now, I am using the same jar in a Spring Batch and I would like to use the same spring configuration file.</p>
  
  <p>My problem is that I am passing the web service addresses as system properties to my batch with the </p>
  
  <pre><code>java -DmyFoo=bar
  </code></pre>
  
  <p>Using this</p>
  
  <pre><code>&lt;context:property-placeholder system-properties-mode="OVERRIDE" ignore-unresolvable="true" /&gt;
  </code></pre>
  
  <p>I can get my variables as @Value("myFoo")</p>
  
  <p>So my question is: is there any way to be able to get my JNDI variables in my property placeholder? Or be able to get them as JNDI and then expose them in a property placeholder?</p>
  
  <p>What I want to be able to do is replace this</p>
  
  <pre><code>&lt;bean id="MBean" class="com.xxx.utils.ActivationMBean"&gt;
      &lt;property name="makeCall"&gt;
          &lt;jee:jndi-lookup jndi-name="semantic.activation" /&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>By this</p>
  
  <pre><code>&lt;bean id="MBean" class="com.xxx.utils.ActivationMBean"&gt;
      &lt;property name="makeCall" value="${semantic.activation}" /&gt;
  &lt;/bean&gt;
  </code></pre>