在一个jboss中同时发布两个应用,并且两个应用中含有相同的类,可采用以下两个方法来实现:
一、在\jboss-3.2.8.SP1\server\default\deploy\jbossweb-tomcat50.sar\META-INF\jboss-service.xml这个文件中,将其中的
<!-- A flag indicating if the JBoss Loader should be used. This loader
uses a unified class loader as the class loader rather than the tomcat
specific class loader.
-->
<attribute name="UseJBossWebLoader">true</attribute>
其中的属性值由true-->false.
二、在\jboss-3.2.8.SP1\server\default\conf\jboss-service.xml中,找到如下:
<attribute name="URLs">
deploy/
</attribute>
将其修改为
<attribute name="URLs">
deploy/,deploy2/
</attribute>
然后在\jboss-3.2.8.SP1\server\default这个目录下新建一个文件夹deploy2,将两个不同的应用分别放在不同的文件夹下即可。
看看你的jboss-service.xml文件,找到这一段: deploy/ 增加自己的发布目录 deploy/,/D:/deploy1,/C:/deploy2 新增的两个目录,结构要符合发布标准