J2EE.8.2 Application Assembly


This section specifies the sequence of steps that are typically followed when composing a J2EE application.

J2EE.8.2.1 Assembling a J2EE Application

  1. Select the J2EE modules that will used by the application.

  2. Create an application directory structure.

    The directory structure of an application is arbitrary. The structure should be designed around the requirements of the contained components .

  3. Reconcile J2EE module deployment parameters.

    The deployment descriptors for the J2EE modules must be edited to link internally satisfied dependencies and eliminate any redundant security role names . An optional element alt-dd (described in Section J2EE.8.4, "J2EE:application XML DTD") may be used when it is desirable to preserve the original deployment descriptor. The element alt-dd specifies an alternate deployment descriptor to use at deployment time. The edited copy of the deployment descriptor file may be saved in the application directory tree in a location determined by the application assembler. If the alt-dd element is not present, the deployer must read the deployment descriptor directly from the JAR.

    1. Link the internally satisfied dependencies of all components in every module contained in the application. For each component dependency, there must only be one corresponding component that fulfills that dependency in the scope of the application.

      1. For each ejb-link , there must be only one matching ejb- name in the scope of the entire application (see Section J2EE.5.3, "Enterprise JavaBeans (EJB) References").

      2. Dependencies that are not linked to internal components must be handled by the deployer as external dependencies that must be met by resources previously installed on the platform. External dependencies must be linked to the resources on the platform during deployment.

    2. Synchronize security role-names across the application. Rename unique role-names with redundant meaning to a common name.

  4. Create an XML deployment descriptor for the application. The deployment descriptor must be named " application.xml " and must reside in the top level of the META-INF directory of the application .ear file. The deployment descriptor must be a valid XML document according to the document type definition (DTD) for a J2EE: application XML document. The deployment descriptor must include an XML document type definition with a PUBLIC identifier of " -//Sun Microsystems//J2EE Appli cation Deployment 1.0//EN ."

  5. Package the application.

    1. Place the J2EE modules and the deployment descriptor in the appropriate directories. The deployment descriptor must be located at META-INF/application.xml.

    2. Package the application directory hierarchy in a file using the Java archive (JAR) file format. The file should be named with a .ear filename extension.

J2EE.8.2.2 Adding and Removing Modules

After the application is created, J2EE modules may be added or removed before deployment. When adding or removing a module the following steps must be performed:

  1. Decide on a location in the application package for the new module. Optionally create new directories in the application package hierarchy to contain any J2EE modules that are being added to the application.

  2. Copy the new J2EE modules to the desired location in the application package. The packaged modules are inserted directly in the desired location; the modules are not unpackaged.

  3. Edit the deployment descriptors for the J2EE modules to link the dependencies which are internally satisfied by the J2EE modules included in the application.

  4. Edit the J2EE application deployment descriptor to meet the content requirements of the J2EE platform and the validity requirements of the J2EE: application XML DTD.



Java 2 Platform, Enterprise Edition. Platform and Component Specifications
Java 2 Platform, Enterprise Edition: Platform and Component Specifications
ISBN: 0201704560
EAN: 2147483647
Year: 2000
Pages: 399

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net