[jboss-user] [Snowdrop] - Re: JBoss 5, Spring 3 Autowiring beans
piobair
do-not-reply at jboss.com
Thu May 19 14:22:53 EDT 2011
piobair [http://community.jboss.org/people/piobair] created the discussion
"Re: JBoss 5, Spring 3 Autowiring beans"
To view the discussion, visit: http://community.jboss.org/message/606128#606128
--------------------------------------------------------------
Trying the @Autowired approach and having no luck with that either. It's a little unclear from the docs referenced exactly what ejb 3.0 requires. I have a beanRefContext.xml file defined as so:
<beans>
<bean id="beanFactory" class="org.springframework.context.support.ClassPathXmlApplicationContext">
<constructor-arg value="applicationContext.xml" />
</bean>
</beans>
It's being deployed in the META-INF directory (I tried it at root also - unclear where this should really go).
I have
@Interceptors(SpringBeanAutowiringInterceptor.class)
defined in the ServiceBean implementation and @Autowired on the fields to autowire.
It _appears_ from the docs that this is all that should be necessary, but it's still not working. Anyway, I think I'm doing what I'm supposed to, but still end up with NPEs when referencing objects that should be autowired.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/606128#606128]
Start a new discussion in Snowdrop at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2082]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110519/635942ba/attachment-0001.html
More information about the jboss-user
mailing list