Marius Bogoevici [
http://community.jboss.org/people/marius.bogoevici] created the
discussion
"Re: JBoss 5, Spring 3 Autowiring beans"
To view the discussion, visit:
http://community.jboss.org/message/605868#605868
--------------------------------------------------------------
Hm, I tried to reproduce the issue myself using the Spring deployer (on which the example
seems to be initially based), but I see a different issue: the Spring lifecycle
interceptor is applied correctly and tries to inject the bean, but because the managed
bean is deployed before the Spring application context is bootstrapped, the deployment
fails (the lifecycle interceptor cannot find the object in JNDI). One solution is to
change the ordering of the deployments.
I suppose that switching to @Autowired (as you did for the class) would help, but you
would also need to set up a ClasspathSingletonBeanFactoryLocator - see
http://static.springsource.org/spring/docs/3.0.x/spring-framework-referen...
http://static.springsource.org/spring/docs/3.0.x/spring-framework-referen...
(the EJB2 section explains how to set it up, and the EJB3 section explains how to use it
for EJB3).
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/605868#605868]
Start a new discussion in Snowdrop at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]