uCosminexus Application Server, Common Container Functionality Guide

[Contents][Glossary][Index][Back][Next]

13.5.3 Deploying the EAR files and ZIP files in the exploded archive format

You can import the EAR files or the ZIP files exported from J2EE servers, in an exploded archive format into the J2EE server. By using this functionality, you can easily operate the created EAR files and ZIP files as exploded archive-format J2EE applications.

Organization of this subsection
(1) Expanding the EAR files and ZIP files
(2) Rules for generating the directory names

(1) Expanding the EAR files and ZIP files

Expand the contents of the EAR files and ZIP files into any directory and import the files into the J2EE server as the exploded archive-format J2EE applications. The following figure shows the expansion of the EAR files and ZIP files.

Figure 13-4 Expanding the EAR files and ZIP files

[Figure]

When you import the files, specify the EAR file, ZIP file, and the expansion destination directory that forms the application directory, as the command arguments. The J2EE server receives the path information for the expansion destination directory from the command, generates the application directory based on the path information, and expands the contents of the EAR files and ZIP files under the application directory.

(2) Rules for generating the directory names

When you import the EAR files and ZIP files in the exploded archive format, a conflict of directory names might occur. The rules for generating the directory name differ according to the conflict pattern of the directory names. The following table describes the rules for generating the directory name for the EJB-JAR directory and WAR directory used for expanding the EAR files and ZIP files.

Table 13-6 Rules for generating the directory name for the EJB-JAR directory and WAR directory used for expanding the EAR files and ZIP files

Conflict pattern of the directory name Rules for generating directory names
application.xml exists and the directory name does not conflict with the directory in the EAR file. The string that remains after removing the extension (.jar or .war) from the EJB-JAR file and WAR file becomes the name of the EJB-JAR directory and WAR directory.
If the EJB-JAR file and WAR file do not have an extension, the file name becomes the directory name as is.

  • The directory name conflicts in the EJB-JAR file and WAR file.
  • The directory name conflicts with the directory in the EAR file.
The string obtained by substituting the EJB-JAR file and WAR file extensions (.jar or .war) with _jar or _war respectively, becomes the name of the EJB-JAR directory and WAR directory.
The directory names conflict even when replaced with _jar or _war. A serial number (1 to 2147483647) is added at the end of _jar or _war.

The following figure shows the EAR file configuration and the generated application directory configuration when a directory name conflict occurs.

Figure 13-5 Example of directory name conflict

[Figure]

Note
If the application directory, which is created by using the -d option of the cjimportapp command and expanding the EAR files and ZIP files, satisfies any of the following conditions, that application directory cannot be imported with the -a option of the cjimportapp command and used as the exploded archive-format application directory.
  • An EJB-JAR module name does not end with .jar.
  • A WAR module name does not end with .war.
  • A module name without extension is duplicated with another module name without extension.
  • A module name without extension is duplicated with a directory in the EAR file.