JBoss AS 7 - 以一定的顺序部署战争 [英] JBoss AS 7 - Deploying wars in certain order

查看:176
本文介绍了JBoss AS 7 - 以一定的顺序部署战争的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在独立模式部署一些.war文件,问题是,我需要他们以一定的顺序部署...
我有:file1.war,file2.war,file3。 war和我必须部署第一个file2.war,然后file3.war和最后file1.war

Im trying to deploy some .war files in a standalone mode, the problem is that i need them to be deployed in a certain order... I have: file1.war, file2.war, file3.war and i have to deploy first file2.war, then file3.war and finally file1.war

我看到很多帖子,但我得到的答案是

I've seen lots of posts but all the answers i get are for previous versions of Jboss

推荐答案

以前版本的Jboss

解决方案

我不确定你的用例是什么,但控制排序不是最佳的部署方式,因为JBoss尝试做并行部署以加快进程,如果你应该这样做,那么你可以提供每个部署的依赖另一个。例如,如果你想file2.war在file1.war之后部署,你应该在file1.war上提供一个file2.war的依赖关系,如下所示在 jboss-deployment-structure.xml (存储在 META-INF in wars)

I am not really sure what your use case is but controlling ordering is not the optimal way to deploy because JBoss tries to do parallel deployments to speed up the process, if you should do that then you can provide dependencies of each deployment on another. For example if you want file2.war to deploy after file1.war, you should provide a dependency of file2.war on file1.war as shown below in your jboss-deployment-structure.xml (stored in META-INF for ears and WEB-INF in wars)

<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
  <deployment>
    <dependencies>
      <module name="deployment.file1.ear" />
    </dependencies>
  </deployment>
</jboss-deployment-structure>

再次,尝试微管理部署很少需要,但谨慎使用。

Again, trying to micro manage the deployments is rarely necessary but use this with caution.

祝你好运!

这篇关于JBoss AS 7 - 以一定的顺序部署战争的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆