JBoss Community

Re: JBoss 5, Spring 3 Autowiring beans

created by piobair in Snowdrop - View the full discussion

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

Start a new discussion in Snowdrop at Community