How can I represent new JndiTemplate(properties).lookup(name)
, where name is a string variable, in the Spring application context file? Can I express it in a way similar to the following, where the application provides name
when it retrieves the bean ID?
<util:properties id="applicationProperties"
location="classpath:application.properties"/>
<jee:jndi-lookup id="connectionFactory"
jndi-name="${name}"
environment-ref="applicationProperties"
resource-ref="false" />