[jboss-user] [JBoss Microcontainer] - Is there auto-injection going on?
David Bosschaert
do-not-reply at jboss.com
Tue Apr 27 10:24:29 EDT 2010
David Bosschaert [http://community.jboss.org/people/bosschaert] created the discussion
"Is there auto-injection going on?"
To view the discussion, visit: http://community.jboss.org/message/539804#539804
--------------------------------------------------------------
Looking at the Spring demo in the User's Guide examples I can see that it references the mcBean and gets injected by it. However the mcBean itself doesn't explicitly reference the SimpleBean...
<bean id="testBean" class="org.jboss.example.microcontainer.spring.SimpleBean">
<!-- other stuff -->
<property name="refBean"><ref bean="mcBean"></ref></property></bean>
<bean xmlns="urn:jboss:bean-deployer:2.0" name="mcBean" class="org.jboss.example.microcontainer.spring.MCBean"></bean>
however, the MCBean still gets injected by the SimpleBean through the setSimpleBean() method
public class MCBean
{
public void setSimpleBean(SimpleBean simpleBean)
{
System.out.println("Setting simple bean: " + simpleBean);
}
}
Is there some auto-injection going on or am I missing the declaration for it somewhere?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/539804#539804]
Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2114]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100427/650aec1c/attachment.html
More information about the jboss-user
mailing list