cjimportapp (import J2EE application)
- Organization of this page
Format
- For importing an application in archive format
cjimportapp [server-name] [-nameserver provider-URL] [-nodelete] -f EAR-file-path [-f EAR-file-path...]
- For importing an application in exploded archive format (application directory)
cjimportapp [server-name] [-nameserver provider-URL] -a application-directory-path
- For importing an application in the exploded archive format (standard application file (extension .ear) or the information file of the application execution environment for the Application Server (extension .zip))
cjimportapp [server-name] [-nameserver provider-URL] [-nodelete] -f EAR-file-path -d exploded-archive-path
Function
This command imports J2EE applications into the specified J2EE server. When importing the J2EE application containing cosminexus.xml, cosminexus.xml is also imported.
If an EAR file that contains execution information is imported, the execution information of the imported J2EE application becomes the same as the execution information of the J2EE application when it was exported.
Arguments
- server-name
-
Specifies the name of a connected J2EE server. If the server name is omitted, the host name is assumed as the server name.
- -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.
- -nodelete
-
Specifies that the application is not to be deleted if startup processing fails when the EAR file containing the execution information is imported.
If this option is omitted, the imported application is deleted if startup processing fails after the application is imported.
- -f EAR-file-path
-
Specifies the path of the EAR file that contains the J2EE application to be imported. Multiple EAR files can be specified concurrently.
- -a application-directory-path
-
Specifies the path of the application directory.
- -d exploded-archive-path
-
Specifies the full path of the server-side directory for exploding the application. The user who starts the J2EE server must have write permission for the exploded destination directory.
Input examples
- For importing an application in archive format
cjimportapp MyServer -f App1.ear
- For importing an application directory as an application in exploded archive format
cjimportapp MyServer -a AppDirPath
- For importing standard application file (extension .ear) or the information file of the application execution environment (extension .zip) for the Application Server, as an application in the exploded archive format
-
- In Windows
cjimportapp MyServer -f App1.zip -d C: \extractdir\ApplicationDir
- In UNIX
cjimportapp MyServer -f App1.zip -d /extractdir/ApplicationDir
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.
- 8:
-
An information error occurred during execution.
- 9:
-
The command could not be executed because there are no administrator privileges (in Windows).
Notes
-
You cannot use the application directory as a directory (in the exploded archive format) imported with the -a option, if the application directory is created by using the -d option to deploy the EAR or ZIP file that satisfies one of the following conditions:
-
The EJB-JAR module name does not end with .jar.
-
The WAR module name does not end with .war.
-
A module name without the extension is the same as another module name without the extension.
-
A module name without the extension is the same as a directory name in the EAR file.
-
-
When the <display-name> tag of application.xml is not set or when null is set in the <display-name> tag, use the file name or directory name as the display name for the J2EE application. Note that if characters other than universal characters or single byte alphanumeric are included in file name or directory name then these characters are replaced with an underscore "_".
-
The display name of J2EE application changes as follows when application.xml is excluded:
-
For EAR file, a string where extension is excluded from file name is displayed. However, you cannot exclude the extension for file names beginning with a period (.).
-
For application directories, displays application directory names.
-
Note that if characters other than single byte alphanumeric characters (0-9, A-Z, or a-z) or underscore (_) are displayed in the display name after conversion then these characters are replaced with an underscore (_).
-
-
When you specify the application directory and import an application in the exploded archive format, if the imported J2EE application contains application.xml, the name acquired by omitting the extension from the path name specified in the <module> tag of application.xml becomes the EJB-JAR directory name and the WAR directory name. Furthermore, if the imported J2EE application does not contain application.xml, the end of the EJB-JAR directory name becomes _jar and the end of the WAR directory name becomes _war.
-
If the import-destination J2EE server already contains a J2EE application with the same application name, this command terminates with an error.
-
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 EAR-file-path -f provider-URL).
-
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).
-
There are some more notes for importing the J2EE application.
-
For importing J2EE applications, see 8.1 Importing the J2EE applications in the uCosminexus Application Server Application Setup Guide.
-
If the name of the application to be imported has more than 255 characters, an error will occur.
-
A Java heap of approximately three times the file size specified in the argument is temporarily used. When the value three times the file size exceeds the estimated value of the Java heap of the J2EE server, you must specify a value of three times the file size, in the size of the Java heap of the J2EE server.