在一个jboss中可以发布多个项目,如果修改一个项目后只想重启该项目,其它项目不重启,可以使用jboss的热部署。
1、修改jboss的配置文件server/default/deploy/jboss-web.deployer/context.xml
在Context元素中添加antiResourceLocking="true" 和 antiJARLocking="true" 属性,如下
<Context cookies="true" crossContext="true" antiResourceLocking="true" antiJARLocking="true" >
<Manager pathname=""/>
<InstanceListener>org.jboss.web.tomcat.security.RunAsListener</InstanceListener>
</Context>
2、重启Jboss
3、修改项目下的web.xml(在web.xml中增加或者删除空行就可以),jboss就会只对该项目重新部署。