8.2 Exporting J2EE applications
Execute the following command to export the J2EE applications:
- Execution format
cjexportapp [server-name] [-nameserver provider-URL] -name J2EE-application-name -f EAR-file-path [-raw|-normal]
- When runtime information is included
-
Specify -normal (default value).
- When runtime information is not included
-
Specify -raw.
- Execution example
cjexportapp MyServer -name account -f C:\home\account.zip
Runtime information of an EAR file is included in this example.
For details on the cjexportapp command, see cjexportapp (export J2EE application) in the uCosminexus Application Server Command Reference Guide.
The following are the precautions to be taken when exporting a J2EE application:
-
Precautions related to runtime information
-
Precautions related to the DD of EAR files
- Precautions related to runtime information
-
-
When exporting a J2EE application, you can select either of the files mentioned below. The default file format contains the runtime information (ZIP format).
- File containing runtime information (ZIP format)
-
These are the ZIP format files containing runtime information. Note that the file containing the runtime information is unique to Cosminexus.
- EAR
-
An EAR file is provided in Java 2 Platform, Enterprise Edition. An EAR does not contain runtime information.
The J2EE applications that are exported in a format containing runtime information are not downward compatible. Do not change the contents of J2EE applications.
In a system that consists of multiple J2EE servers, when JDBC resource settings, database used, and runtime properties of the J2EE applications are to be the same among the J2EE servers, use EAR files that include runtime information. At this time, Hitachi recommends exporting the J2EE applications created in one J2EE server and importing it on the J2EE servers.
When importing a J2EE application created on a J2EE server to a J2EE server on another system or to a J2EE server that has a different execution environment on the same system, or when using the application with other J2EE server products, export the J2EE application by using the EAR file format.
-
When exporting an exploded archive format application that is registered in a J2EE server, generate an EAR file or a ZIP file that includes runtime information.
-
When exporting an application that is JSP pre-compiled at application start time, the JSP compilation result is included in the exported EAR file. When the EAR file that includes the JSP compilation result is imported to another J2EE server, you can use the compilation result of the JSP file included in the EAR file.
-
When an imported J2EE application contains cosminexus.xml, the application is exported with cosminexus.xml as it is. For details on exporting applications that include cosminexus.xml, see 13.3.6 Running an application that includes cosminexus.xml in the uCosminexus Application Server Common Container Functionality Guide.
-
- Precautions related to the DD of EAR Files
-
-
Depending on the J2EE application version, the DD version of EAR is 1.4 or later.
-
Depending on the EJB-JAR version, the DD version of EJB-JAR included in EAR is 2.0 or later.
-
Depending on the WAR version, the DD version of WAR included in EAR is 2.3 or later.
-
The DD for the various components included in an EAR has UTF-8 encoding.
-