-
1. Re: How to import external resource in application.context.xml of JBoss AS7.1.1
jamesviet Apr 7, 2013 11:13 PM (in response to jamesviet)Can someone help me ?
-
2. Re: How to import external resource in application.context.xml of JBoss AS7.1.1
sfcoy Apr 8, 2013 3:10 AM (in response to jamesviet)I'd try setting up a configuration module as described in How to put an external file in the classpath and refer to it from both of your applications.
-
3. Re: How to import external resource in application.context.xml of JBoss AS7.1.1
jamesviet Apr 16, 2013 4:23 AM (in response to sfcoy)Hi Stephen Coy,
After read some guide from google:
I changed to :
<import resource="classpath*:/META-INF/shared.xml" /> Use classpath*:
Now the server log didn't throw: Caused by: java.io.FileNotFoundException: class path resource [META-INF/shared.xml] cannot be opened because it does not exist
But now it throw:
.................
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'txManager' is defined
txManager bean defined in shared.xml.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:jee="http://www.springframework.org/schema/jee"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
<bean id="txManager"
class="ABC">
<property name="name" value="user" />
</bean>
....
I also config in jboss-deployment-structure.xml of app2
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="lib" /> <!--path to folder contains app1 -->
</dependencies>
</deployment>
</jboss-deployment-structure>
And Module.xml
<module xmlns="urn:jboss:module:1.1" name="lib">
<resources>
<resource-root path="app1.jar"/>
...
Could you plz help me?
Thanks,
-
4. Re: How to import external resource in application.context.xml of JBoss AS7.1.1
guillo Nov 25, 2013 4:15 PM (in response to jamesviet)I have the same issue.