中设置两个耳朵的部署顺序

中设置两个耳朵的部署顺序

本文介绍了如何在 Wildfly 中设置两个耳朵的部署顺序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于 Wildfly 8.1 中两个应用程序的部署顺序,我有一些问题.问题是app2.ear的一些模块依赖于app1.ear的模块,而app1.ear是在app2之后部署的.ear.

I've some issue regarding the deployment order of two applications inside Wildfly 8.1.The problem is that some modules of app2.ear depends of modules from app1.ear, but app1.ear is deployed after app2.ear.

我尝试为 app1 指定一个依赖项,如下所示:

I've tried to specify a dependency for app1 like this:

<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <deployment>
    <dependencies>
        <module name="app2.ear" />
    </dependencies>
  </deployment>
</jboss-deployment-structure>

但不幸的是,app1.ear 部署失败并出现此错误:

But no luck, app1.ear fails to deploy with this error:

{"JBAS014671: Failed services" ... 导致:org.jboss.modules.ModuleNotFoundException: app2.ear:main"}}

知道它是否可能以及如何点它吗?

Any idea if it is possible and how to dot it ?

提前谢谢.

推荐答案

META-INF/jboss-all.xml中指定依赖项.

Specify the dependencies in META-INF/jboss-all.xml.

所以对于您的 app2.ear,它看起来像:

So for your app2.ear it can look like:

<jboss xmlns="urn:jboss:1.0">
    <jboss-deployment-dependencies xmlns="urn:jboss:deployment-dependencies:1.0">
        <dependency name="app1.ear" />
    </jboss-deployment-dependencies>
</jboss>

这篇关于如何在 Wildfly 中设置两个耳朵的部署顺序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 02:06