简体   繁体   English

如何在不重新启动jboss服务器的情况下部署Web应用程序

[英]How to deploy web application without restart jboss server

i'm new to jboss server. 我是jboss服务器的新手。 I have jboss-4.2.3 server. 我有jboss-4.2.3服务器。 I have many application in single server. 我在单个服务器上有很多应用程序。 I need to deploy my application without restart my jboss server. 我需要部署应用程序而无需重新启动jboss服务器。 Is it possible? 可能吗? If so what are the options to do that? 如果是这样,有什么选择呢?

Thanks in advance!! 提前致谢!!

Yes, you just have to move the application (ear or war) in the deploy directory, and JBoss will automatically redeploy it (providing you've the hot deployment scanner active). 是的,您只需要将应用程序(ear或war)移动到deploy目录中,JBoss将自动重新部署它(前提是您已激活热部署扫描器)。 If a previous version of the application was already deployed in JBoss, it will be redeployed automatically as well. 如果该应用程序的先前版本已在JBoss中部署,则它也会自动重新部署。

But keep in mind that the hot deployment is not advisable in production environments, because depending on the application it may fail (for example, a common problem is that sometimes jsp aren't recompiled when the war is redeployed, so the previous jsp will still be sent to the user). 但是请记住,在生产环境中不建议使用热部署,因为根据应用程序的不同,热部署可能会失败(例如,一个常见的问题是,在重新部署战争时,有时不会重新编译jsp,因此以前的jsp仍然会发送给用户)。 If you still want/need to use hot deployment, to try to minimize this kind of problems, you can configure JBoss to delete automatically the old jsp compiled classes setting the property deleteWorkDirOnContextDestroy to true in the file deploy/jbossweb-tomcat55.sar/META-INF/jboss-service.xm‌​l , that will make a safer hotdeployment. 如果仍然希望/需要使用热部署,以尽量减少此类问题,可以配置JBoss以自动删除旧的jsp编译类,并在文件deploy/jbossweb-tomcat55.sar/META-INF/jboss-service.xm‌​l中将属性deleteWorkDirOnContextDestroy设置为true。 deploy/jbossweb-tomcat55.sar/META-INF/jboss-service.xm‌​l ,这将使安全的热部署更加安全。

If your application is already deployed and you want to redeploy -->> 如果您的应用程序已经部署,并且您想重新部署->>

If jboss is running in 'Development-Mode' ,then you can use 'touch' to app/WEB-INF/web.xml (Or open web.xml and save ) by this way you are updating its timestamp. 如果jboss在“开发模式”下运行,那么您可以使用“触摸”方式来更新app / WEB-INF / web.xml(或打开web.xml并保存),从而更新其时间戳。

If your application is new to jboss then ->> 如果您的应用程序是jboss的新手,则->>

put your ear/war to deploy folder server will deploy it. 尽力部署文件夹服务器将对其进行部署。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM