[jboss-user] [JBoss/Spring Integration] - AnnotationBeanConfigurerAspect issue

wspiteri do-not-reply at jboss.com
Thu May 10 09:19:11 EDT 2007

I have two EAR's deployed into my JBOSS server, each containing a single Stateless Session Bean.  The SLSB in EAR 2 calls the other SLSB in EAR1 via use of Springs LocalStatelessSessionProxyBean.  

The AnnotationBeanFactoryConfigurerAspect as defined in the Spring manual is a Singleton, and the manual states the you should use a separate Classloader per spring-aspects.jar.  In both of my EAR's I therefore have spring-aspects.jar in the lib folder, and I DO NOT have one in the server lib folder. 

The issue I am now facing is that when SLSB 2 calls SLSB 1, the AnnotationBeanFactoryConfigurerAspect loses all knowledge of the beans defined in application 2.  Therefore for all the aop:spring-configured beans in application 2, I get a NoSuchBeanDefinitionException. 

I am certain when EJB B invokes EJB A which inturn invokes its onEJBCreate method the bean definitions get refreshed due to a new set of applicationContexts being loaded.  Once the call returns from that invocation, the AnnotationBeanFactoryConfigurerAspect no longer understands my application B's beans and therefore the exception occurs.

The other strange point to note is if I manually create EJB A first via a separate call, then invoke EJB B the AnnotationBeanFactoryConfigurerAspect is OK for application B.

Any help would be greatly appreciated.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4044667#4044667

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4044667

More information about the jboss-user mailing list