we want to evaluate JBoss 5.1.0 with Spring 2.5.6. I read a couple of threads in the forum and realized that all of the spring users make use of the -spring.xml files in the META-INFs of the corresponding .jars, .wars etc.
At the moment we have an .ear-structure like this and it went smooth in the GlassFishv3.
------ servicebeans-01.jar -> beanRefContext.xml, serviceContext-01.xml
------ servicebeans-02.jar -> serviceContext-02.xml
in the web.xml of the wars I use the following config
there's a parentApplicationContext, that instantiates the required beans via the given config in beanRefContext.xml (defaultname in Spring) which is looked up in the classpath. Both webservices should use beans from this appCtx. Actually the deployment works fine, all the required beans are instantiated only once. Except one important thing. The wiring between the WebserviceImpl in the .wars and the appCtx with the serviceBeans is not done.
According to this presentation http://www.redhat.com/f/pdf/jbw/mbogoevici_1050_spring_on_jboss.pdf, it should be possible. Otherwise I misunderstood this part of the presentation and didn't recognize that it is made clear just to use the -spring.xml files.
Method 1: Spring's SpringBeanAutowiringInterceptor
● EJB3 interceptor
● Uses a BeanFactoryLocator to retrieve the
● Recognizes the @Autowired annotation
I also used the SpringBeanAutowiringSupport, which worked fine in GlassFishv3 ... no success.
So in the end I am looking for a way that allows me to make use of Spring's @Autowiring without using the spring-deployer module for a common appCtx.
Is there any solution to keep the above mentioned .ear-configuration and let the autowiring be done by JBoss (modules)? I know that it is probably possible if i change my config to the corresponding -spring.xml files but that's only the last solution i want to do. Otherwise I will die of config-management for my app in different ApplicationServers. Any help would be appreciated.