zoukankan      html  css  js  c++  java
  • what is a ear

    http://docs.oracle.com/javaee/6/tutorial/doc/bnaby.html

    An EAR file (see Figure 1-6) contains Java EE modules and, optionally, deployment descriptors. A deployment descriptor, an XML document with an .xml extension, describes the deployment settings of an application, a module, or a component. Because deployment descriptor information is declarative, it can be changed without the need to modify the source code. At runtime, the Java EE server reads the deployment descriptor and acts upon the application, module, or component accordingly.

    具体例子:

    jboss-javaee-multi-ear
    │   jboss-javaee-multi-ejb.jar
    │   jboss-javaee-multi-web.war
    │
    └───META-INF
            application.xml
            jboss-javaee-multi-ds.xml

    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" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/application_7.xsd" version="7">
      <display-name>jboss-javaee-multi-ear</display-name>
      <module>
        <web>
          <web-uri>jboss-javaee-multi-web.war</web-uri>
          <context-root>/jboss-javaee-multi-web</context-root>
        </web>
      </module>
      <module>
        <ejb>jboss-javaee-multi-ejb.jar</ejb>
      </module>
      <library-directory>lib</library-directory>
    </application>

     部署运行后效果:

    如何创建这个例子:

    使用eclipse 如下操作 new ear

  • 相关阅读:
    关于PHP引用(符号&)的用法
    inline元素相关
    内联元素的margin属性
    chrome 开发者工具使用详情
    闭包 by 5wilon
    容易失忆的css
    题目:吃西瓜
    题目:装箱问题
    题目:最小乘车费用
    题目:竞赛真理
  • 原文地址:https://www.cnblogs.com/zno2/p/5968844.html
Copyright © 2011-2022 走看看