cjimportwar (Import a WAR application)

Format

When importing a WAR application of the archive format

cjimportwar [server-name] [-nameserver provider-URL]
           -f WAR-file-path [-name application-name]
           [-contextroot context-root]
           [-c cosminexus.xml-file]

When importing as a WAR application of the exploded archive format (WAR directory)

cjimportwar [server-name] [-nameserver provider-URL]
           -a WAR-directory-path [-name application-name]
           [-contextroot context-root]
           [-c cosminexus.xml-file]

Function

Imports a WAR application to the specified J2EE server. While importing a WAR application, reads cosminexus.xml in the path specified in the -c option.

Arguments

server-name
Specifies the connection destination J2EE server name. When you omit the server name, the host name is used as the server name.
-nameserver provider-URL
Specifies the access protocol to CORBA Naming Service, host name on which CORBA Naming Service operates, and the port number used by CORBA Naming Service, in the following format:

protocol-name::host-name:port-number

For details about the specified contents, see 2.1(2) Provider URL.
-f WAR-file-path
Specifies the path of the WAR file to be imported.
-a WAR-directory-path
Specifies the path of a WAR directory.
-name application-name
Specifies an application name in one or more characters.
In the application name, you can use the alphanumeric characters (0~9, A~Z, a~z), and the following special characters:
Plus (+), hyphen (-), period (.), carot (^), underscore (_).
If you omit the -name option, the J2EE server specifies the application name by replacing the characters that cannot be used, with an underscore (_), based on the WAR file name or WAR directory name. When the application name that the J2EE server sets, duplicates within the J2EE server, the application name is suffixed with a serial number (1 through 2147483647), so that the application name becomes unique within the J2EE server.
-contextroot context-root
Specifies the context root.
In the context root, you can use the characters that can be used with URI (RFC3986). However, you cannot specify a character string that starts with ejb/, web/, /ejb/, and /web/.
When specifying a root, specify a blank character string or a slash (/).
When you omit the -contextroot option, the J2EE server specifies the application name by replacing the characters that cannot be used, with an underscore (_), based on the WAR file name or WAR directory name. However, when the character string in which the extension has been removed from a WAR file or a WAR directory name is ejb or web, the name is converted to ejb1 or web1 respectively.
-c cosminexus.xml-file
Specifies the path of the cosminexus.xml file. Note that the name of the cosminexus.xml file is cosminexus.xml which consists of all lower case characters.
When you omit the path of the cosminexus.xml file, the cosminexus.xml file is not read.

Input example

When importing a WAR application in the archive format

cjimportwar MyServer -f WarApp1.war -name WarApp1 -contextroot app1/appwar -c cosminexus.xml

When importing a WAR directory as an application of the exploded archive format

cjimportwar MyServer -a WarAppDirPath -name WarApp1 -contextroot app1/appwar -c cosminexus.xml

Return values

0:
The command is terminated normally.
1:
The command is terminated abnormally.
2:
The command could not be executed because of an exclusion error.
3:
A timeout occurred.
8:
An information error occurred at the time of execution.
9:
The command cannot be executed as the administrator privileges are not given (in Windows Server 2012, Windows Server 2008, Windows 8, Windows 7, or Windows Vista).

Notes