JBoss List Archives
Sign In
Sign Up
Sign In
Sign Up
Manage this list
2025
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
List overview
Download
thread
[jboss-user] [Spring Integration] - JBoss 5.1.0 and Multiple EARs
Kyle Bober
Wednesday, 26 May 2010
Wed, 26 May '10
3:47 p.m.
Kyle Bober [
http://community.jboss.org/people/kyle.bober
] created the discussion "JBoss 5.1.0 and Multiple EARs" To view the discussion, visit:
http://community.jboss.org/message/544949#544949
-------------------------------------------------------------- I have two EARs that contain unique WAR and EJB JAR files. Each EAR contains a beanRefContext.xml file that I have wired up to multiple applicationContext files to use Autowiring in my EJB implementation classes. My EARs are configured to be isolated in the JBoss EAR deployer. Each of my EJBs is configured to use the @Interceptors(SpringBeanAutowiringInterceptor.class) EAR 1 --- WAR1 --- EJB1 JAR EAR 2 --- WAR2 --- EJB2 JAR My issues is when I deploy both of these EARs in the same JBoss instance and attempt to have EJB1 call EJB2 via a remote EJB call I receive the following exception: {code}Caused by: java.lang.RuntimeException: org.springframework.beans.factory.access.BootstrapException: Unable to return specified BeanFactory instance: factory key [null], from group with resource name [classpath*:beanRefContext.xml]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [org.springframework.beans.factory.BeanFactory] is defined: expected single bean but found 2{code} This exception is thrown from EJB1 when it attemps to make a remote ejb call to EJB2. To verify that this is an issue with Spring Integration I removed the @Interceptors(SpringBeanAutowiringInterceptor.class) from EJB2 and returned some dummy data and it worked fine. It seems this issue revolves around the SpringBeanAutowiringInterceptor.class. Any help here resolving this issue would be much appreciated! Here are the beanRefContext.xml files which are include in the root of the EAR files. EAR1 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance
http://www.w3.org/2001/XMLSchema-instance"
xmlns:jee="
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee"
xmlns:aop="
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop"
xmlns:tx="
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee-2.5.xsd
http://www.springframework.org/schema/jee/spring-jee-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
<bean id="ear1-context" class="org.springframework.context.support.ClassPathXmlApplicationContext"> <constructor-arg> <list> <value>ejb1-applicationContext.xml</value> <value>dao1-applicationContext.xml</value> </list> </constructor-arg> </bean> </beans> EAR2 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans"
xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance
http://www.w3.org/2001/XMLSchema-instance"
xmlns:jee="
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee"
xmlns:aop="
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop"
xmlns:tx="
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee
http://www.springframework.org/schema/jee/spring-jee-2.5.xsd
http://www.springframework.org/schema/jee/spring-jee-2.5.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
<bean id="ear2-context"> <constructor-arg> <list> <value>ejb2-applicationContext.xml</value> <value>dao2-applicationContext.xml</value> </list> </constructor-arg> </bean> </beans> -Kyle -------------------------------------------------------------- Reply to this message by going to Community [
http://community.jboss.org/message/544949#544949
] Start a new discussion in Spring Integration at Community [
http://community.jboss.org/choose-container!input.jspa?contentType=1&...
]
Attachments:
attachment.html
(text/html — 12.4 KB)
0
/
0
Reply
Back to the thread
Back to the list