.EAR部署命令wildfly-8.0.0Final

时间:2014-03-30 19:39:27

标签: java java-ee deployment jboss wildfly

当我们尝试部署.EAR文件(wildfly-8.0.0Final)时,我们遇到了依赖性问题。 您可以在下面找到.EAR,application.xml&的结构细节。 standalone.xml文件。

尽管将初始化有序设置为TRUE,但它似乎不遵循该顺序,从而导致依赖性问题。我们尝试将 ear-subdeployments-isolated 设置为true和false。

有关如何控制订单或任何其他建议的任何想法?

我们发现了一些帖子(即使用严格),但看起来像旧版本(JBOSS 4.0)。

感谢数百万人的帮助!

+ MMM-app.ear
      | ------------ lib(commons-lib)
      | ------------ infraestrutura-core.jar(ejb)
      | ------------ mmm-logistica.jar(ejb)
      | ------------ mmm-admin-core.jar(ejb)
      | ------------ mmm-financeiro-core.jar(ejb)
      | ------------ mmm-mobile-core.jar(ejb)
      | ------------ file1.war
      | ------------- file2.war
      | -------------- file3.war
      | --------------- file4.war

application.xml中

<?xml version="1.0" encoding="UTF-8"?>

<application xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="7" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/application_7.xsd">
<initialize-in-order>true</initialize-in-order>

<display-name>mmm-package-app</display-name>

<!--A ordem correta de deployment deve ser a desse arquivo, mas com o attributo true ou false não funciona -->

<description>The MMM Deployment Application</description>

<module>
    <ejb>infraestrutura-core-1.0-SNAPSHOT.jar</ejb>
</module>

<module>
    <ejb>mmm-logistica-core-1.0-SNAPSHOT.jar</ejb>
</module>

<module>
    <ejb>mmm-financeiro-core-1.0-SNAPSHOT.jar</ejb>
</module>

<module>
    <ejb>mmm-admin-core-1.0-SNAPSHOT.jar</ejb>
</module>


<module>
    <ejb>mmm-mobile-core-1.0-SNAPSHOT.jar</ejb>
</module>


<module>
    <web>
        <web-uri>mmm-admin-client-1.0-SNAPSHOT.war</web-uri>
        <context-root>/admin</context-root>
    </web>
</module>


 <module>
    <web>
        <web-uri>mmm-site-client-1.0-SNAPSHOT.war</web-uri>
        <context-root>/beta</context-root>
    </web>
</module>


<module>
    <web>
        <web-uri>mmm-mobile-server-1.0-SNAPSHOT.war</web-uri>
        <context-root>/mobile</context-root>
    </web>
</module>



<module>
    <web>
        <web-uri>mmm-lp-client-1.0-SNAPSHOT.war</web-uri>
        <context-root>/</context-root>
    </web>
</module>

<library-directory>lib</library-directory>

standalone.xml

<subsystem xmlns="urn:jboss:domain:ee:2.0">
<ear-subdeployments-isolated>FALSE</ear-subdeployments-isolated>
<spec-descriptor-property-replacement>true</spec-descriptor-property-replacement>
<jboss-descriptor-property-replacement>true</jboss-descriptor-property-replacement>
<annotation-property-replacement>false</annotation-property-replacement>
<concurrent>

的JBoss部署-structure.xml

<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
 <ear-subdeployments-isolated>true</ear-subdeployments-isolated>
 <deployment>
  <dependencies>
   <module name="deployment.MMM-app-1.0-SNAPSHOT.ear" />
  </dependencies>
 </deployment>
 <sub-deployment name="MMM-admin-client-1.0-SNAPSHOT.war">
  <dependencies>
   <module
    name="deployment.MMM-app-1.0-SNAPSHOT.ear.infraestrutura-core-1.0-SNAPSHOT.jar" />
   <module
    name="deployment.MMM-app-1.0-SNAPSHOT.ear.MMM-logistica-core-1.0-SNAPSHOT.jar" />
   <module
    name="deployment.MMM-app-1.0-SNAPSHOT.ear.MMM-financeiro-core-1.0-SNAPSHOT.jar" />
  </dependencies>
 </sub-deployment>
 <sub-deployment name="MMM-site-client-1.0-SNAPSHOT.war">
  <dependencies>
   <module
    name="deployment.MMM-app-1.0-SNAPSHOT.ear.infraestrutura-core-1.0-SNAPSHOT.jar" />
   <module
    name="deployment.MMM-app-1.0-SNAPSHOT.ear.MMM-logistica-core-1.0-SNAPSHOT.jar" />
  </dependencies>
 </sub-deployment>
 <sub-deployment name="MMM-mobile-server-1.0-SNAPSHOT.war">
  <dependencies>
   <module
    name="deployment.MMM-app-1.0-SNAPSHOT.ear.infraestrutura-core-1.0-SNAPSHOT.jar" />
   <module
    name="deployment.MMM-app-1.0-SNAPSHOT.ear.MMM-mobile-core-1.0-SNAPSHOT.jar" />
  </dependencies>
 </sub-deployment>
 <sub-deployment name="MMM-lp-client-1.0-SNAPSHOT.war">
  <dependencies>
   <module
    name="deployment.MMM-app-1.0-SNAPSHOT.ear.infraestrutura-core-1.0-SNAPSHOT.jar" />

   <module
    name="deployment.MMM-app-1.0-SNAPSHOT.ear.MMM-logistica-core-1.0-SNAPSHOT.jar" />

   <module
    name="deployment.MMM-app-1.0-SNAPSHOT.ear.MMM-admin-core-1.0-SNAPSHOT.jar" />

   <module
    name="deployment.MMM-app-1.0-SNAPSHOT.ear.MMM-lp-core-1.0-SNAPSHOT.jar" />
  </dependencies>
 </sub-deployment>
</jboss-deployment-structure>

2 个答案:

答案 0 :(得分:0)

究竟是什么问题?是否有堆栈跟踪或类似的东西?如果你想确保以特殊的顺序加载你的耳朵的罐子和战争,你可以尝试从一个罐子中添加明显的依赖关系,...

但问题是为什么需要这个特殊订单。

答案 1 :(得分:0)

正如上面评论中所述:

尝试在仅具有隐式依赖关系的各个子部署之间添加依赖关系。我认为这将导致您可以依赖的确定性加载顺序。