cjexportapp (export J2EE application)
- Organization of this page
Format
cjexportapp [server-name] [-nameserver provider-URL] -f EAR-file-path -name J2EE-application-name [-raw|-normal]
Function
This command outputs a J2EE application from a J2EE server to an EAR file. Execution information can be contained in the EAR file.
If the imported J2EE application includes cosminexus.xml, the J2EE application will be exported with cosminexus.xml.
If the imported J2EE application does not include application.xml, the J2EE application will be exported without application.xml. However, if application.xml is created during the execution of the cjsetappprop command or the cjrenameapp command, the J2EE application will be exported with application.xml. For details on creating application.xml, see cjsetappprop (set HITACHI Application Property) or cjrenameapp (rename application).
Arguments
- server-name
-
Specifies the name of a connected J2EE server. If the server name is omitted, the host name is assumed.
- -nameserver provider-URL
-
Specifies the access protocol for the CORBA Naming Service, the name of the host running the CORBA Naming Service, and the port number being used by the host. These items are specified in the following format:
protocol-name: : host-name: port-number
For details on the specification items, see 2.1.2 Provider URL.
- -f EAR-file-path
-
-
When -raw is specified
This argument specifies the path of the EAR file containing the J2EE application that is to be exported.
-
When -normal is specified (or neither -raw nor -normal is specified)
This argument specifies the file path that becomes the output destination for the information file of the application execution environment (hitachi-runtime.jar (extension .zip)) of the Application Server.
-
- -name J2EE-application-name
-
Specifies the name of the J2EE application that is to be exported.
- -raw
-
Specifies that execution information is not to be included in the EAR file. In this case, an EAR file that is compliant with JavaTM 2 Platform, Enterprise Edition, is output.
- -normal
-
Specifies that execution information is to be included in the EAR file. When execution information is included, the size of the EAR file increases by the size of the execution information. If neither -raw nor -normal is specified, specification of -normal is assumed.
Input examples
cjexportapp MyServer -f App1.ear -name App1 -raw
Return values
- 0:
-
The command terminated normally.
- 1:
-
The command terminated abnormally.
- 2:
-
The command could not be executed because of an exclusion error.
- 3:
-
A timeout occurred.
- 9:
-
The command could not be executed because there are no administrator privileges (in Windows).
Notes
-
When a J2EE application is exported, various notes apply to the execution information and EAR file DD. For exporting J2EE applications, see 8.2 Exporting J2EE applications in the uCosminexus Application Server Application Setup Guide.
-
If the specified J2EE application does not exist, this command terminates with an error.
-
When you specify a server name in the command arguments, you must specify a case-sensitive character string that matches a server name specified in a cjsetup (set up or unsetup J2EE server).
-
When you specify a server name in the command arguments, you must specify it immediately after the command name. You can specify the other arguments in any order as long as they are subsequent to the server name (or subsequent to the command name if the server name is omitted). However, you cannot switch the sequence of an option name and its corresponding value (for example, you cannot specify provider-URL -nameserver); also, you cannot specify an option name in conjunction with a non-corresponding value (for example, you cannot specify -nameserver J2EE-application-name -name provider-URL).
-
If you change, add, or delete the definition of cosminexus.xml included in J2EE applications, cosminexus.xml is exported as follows:
-
Comments are not stored.
-
The character encoding is UTF-8.
-
Only cosminexus.xml that was last read successfully by the J2EE server is included in the information file of the exported application execution environment and EAR files.
After the J2EE server reads cosminexus.xml, even if you change the application directory cosminexus.xml, the changed definition information is not included in the information file of the exported application execution environment and EAR files.
Example: After you import the J2EE application of the exploded archive format, if the application directory cosminexus.xml is revised and the J2EE application is exported in the EAR format without being started, EAR files do not include cosminexus.xml in the application directory that was updated after the J2EE application was imported. EAR files include the same cosminexus.xml as the one when the J2EE application was imported.
-
-
You cannot export a WAR application. If you specify a WAR application in the -name option, this command terminates abnormally.