简体   繁体   English

如何以编程方式检查JBoss5中是否部署了应用程序?

[英]How to programmatically check if an application has deployed in JBoss5?

I am writing a small app to automate deployments. 我正在编写一个小型应用程序以自动化部署。 Basically, it checks an ftp server periodically for a new .ear file. 基本上,它会定期检查ftp服务器中是否有新的.ear文件。 Compares the checksum of the remote ftp file against what is currently deployed. 将远程ftp文件的校验和与当前部署的校验和进行比较。 If there is a new ftp file, then it gets picked up and deployed... 如果有新的ftp文件,则将其拾取并部署...

I then have a check to see if the app has deployed successfully. 然后,我将检查该应用程序是否已成功部署。 At the moment, I am sending an http get requested for the main landing page of the app and then checking the http return code for a successful deployment. 目前,我正在向应用程序的主登录页面发送http get请求,然后检查http返回代码是否成功部署。 However, I dont think this is the best way to check for a successful deployment as the serverside components might not have deployed. 但是,我认为这不是检查部署是否成功的最佳方法,因为服务器端组件可能尚未部署。

Is there any way I could access some JBoss API to get a list of deployed applications? 有什么方法可以访问某些JBoss API以获得已部署应用程序的列表? Or, if anyone has any other ideas? 或者,如果有人有其他想法?

Thanks in advance... 提前致谢...

JBoss supports the JSR-88 Deployment API . JBoss支持JSR-88部署API Have a look at this client that deploys on JBoss using the JBoss JSR-88 implementation. 看一下使用JBoss JSR-88实现在JBoss上部署的客户端

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

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