[jboss-user] [JBoss/Spring Integration] - dynamic jndiName in @Spring

Firedragon do-not-reply at jboss.com
Fri Aug 3 01:38:28 EDT 2007


We need to support multiple versions of the same ear in a single JBoss instance.

In our session bean, we inject a Spring bean:

@Spring(jndiName="xyzBeanFactory-1.0", bean="manager")
private Manager manager;

This is okay as long as someone remembers to update the session bean by changing jndiName to a dfferent name (e.g. xyzBeanFactory-2.0) every time we release a newer version of the ear.

Instead, we are wondering if jndiName can be dynamic, say get its value from an env-entry in ejb-jar.xml.  This will allow us to make our build tool (maven2) to substitute the bean factory version in ejb-jar.xml before packaging the ear.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070391#4070391

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070391



More information about the jboss-user mailing list