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&...]