简体   繁体   English

Tomcat / JBoss后期部署脚本

[英]Tomcat / JBoss post deployment script

Is there a way to execute a post deployment script in Tomcat / JBoss? 有没有一种方法可以在Tomcat / JBoss中执行后期部署脚本?

I want this script to execute when ever a new WAR file is deployed. 我希望在部署新的WAR文件时执行此脚本。

Also the war files will not know anything about the script, so I can not use Startup Servlets. 而且war文件对脚本一无所知,因此我无法使用Startup Servlets。

Well a possibility on Jboss - standalone can be script that monitors changes to x.war.deploying to x.war.deployed or x.war.failed. 在Jboss上很有可能-独立脚本可以是监视x.war.deployed或x.war.deployed或x.war.failed的更改的脚本。 That way you can have some control on when to execute. 这样,您就可以控制何时执行。

Not sure if file change event on directory is helpful in your case, refer to following link for idea for linux https://superuser.com/questions/181517/how-to-execute-a-command-whenever-a-file-changes 不确定目录上的文件更改事件是否对您有帮助,请参考以下链接以获取Linux https://superuser.com/questions/181517/how-to-execute-a-command-whenever-a-file-变化

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

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