Hi guys,
The current JBoss Spring integration seems to support only byName injection, it would be
great if it could support also byType injection.
ByType injection of dependencies is a very powerfull feature of Spring, and it would be
great if it could be leveraged in the JBoss Spring integration. ByType injection could be
attempted by the SpringInjectionSupport whenever the bean attribute of the Spring
annotation is missing.
@Spring(jndiName = "spring-pojo")
| private IntCreator intCreator;
This feature is restricted to BeanFactory instances which are ListableBeanFactory though.
In this case, the method to call is:
Map ListableBeanFactory#getBeansOfType(Class type) throws BeansException;
The only difficulty with this kind of injection is if more than one bean is of the
expected type. The behavior to follow in that case is described here:
http://static.springframework.org/spring/docs/2.0.x/reference/beans.html#...
Is anybody else interested by that functionality ?
Kind regards !
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974603#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...