关于jboss热部署

1 篇文章 0 订阅
1 篇文章 0 订阅

这段时间初学javaweb开发。
开发过程中,发现jboss总是需要不停重启,浪费时间,于是baidu搜索jboss的热部署。


发现网上都是说在%JBOSS_HOME%\server\default\deploy\jbossweb.sar\context.xml,这个下面修改


<Context cookies="true" crossContext="true" reloadable="true" antiResourceLocking="true" antiJARLocking="true">

但是在我这边不生效,不仅class修改了不生效,vm文件修改了也不生效。
于是尝试把antiResourceLocking这个修改为false,居然vm文件的修改生效了。


antiJARLocking这个即使修改为true、false都不起作用。不过后来发现,jboss要以debug方式启动就生效了(需要设置antiJARLocking=true)




所以最终结论应该是

<Context cookies="true" crossContext="true" reloadable="true" antiResourceLocking="false" antiJARLocking="true">,


然后jboss以Debug方式启动即可。



===================================
另外网上还有一个方法是

(1)修改路径:server\default\deploy\jboss-web.deployer\server.xml

      修改内容:<Host name="localhost" autoDeploy="true" deployOnStartup="false" deployXML="false"            configClass="org.jboss.web.tomcat.security.config.JBossContextConfig" > 

(2)修改路径:server\default\deploy\jboss-web.deployer\context.xml

      修改内容:<Context cookies="true" crossContext="true"  reloadable="true">    <Manager pathname="" />   <InstanceListener>org.jboss.web.tomcat.security.RunAsListener</InstanceListener>       </Context> 

(3)修改路径:server\default\conf\jboss-service.xml 

      修改内容:<attribute name="ScanEnabled">true</attribute>


这种方法,每次修改class之后,jboss重新加载一边,速度慢,而且发现加载第二次就出现error错误。





  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值