JBoss Community

Re: JBoss 5, Spring 3 Autowiring beans

created by Marius Bogoevici in Snowdrop - View the full discussion

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-reference/html/ejb.html#ejb-implementation (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

Start a new discussion in Snowdrop at Community