cjimportres (import resource)
- Organization of this page
Format
- For an EJB-JAR, WAR, or RAR file
cjimportres [server-name] [-nameserver provider-URL] -type {ejb|war|rar} -f file-path [-f file-path ...]
- For a data source
cjimportres [server-name] [-nameserver provider-URL] -type datasource -resname data-source-display-name -c data-source-settings-file-path -f JDBC-driver-file-path [-f JDBC-driver-file-path ...]
Function
This command imports a resource (EJB-JAR, WAR, data source, or RAR file). The command can import multiple files concurrently.
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.
- -type {ejb|war|datasource|rar}
-
Specifies the file type of the file to be imported:
-
ejb: EJB-JAR file
-
war: WAR file
-
datasource: JDBC driver file or data source settings file
-
rar: RAR file
-
- -resname data-source-display-name
-
Specifies the name to be assigned to the imported data source. You can use alphanumeric characters (0-9, A-Z, or a-z) and the underscore (_) in the name.
- -c data-source-settings-file-path
-
Specifies the path of the data source settings file to be read.
- -f file-path or JDBC-driver-file-path
-
Specifies the path of the file (EJB-JAR, WAR, JDBC, or RAR) to be read.
If the JDBC driver consists of multiple files, specify the -f option multiple times.
Input examples
- For an EJB-JAR file
cjimportres MyServer -type ejb -f account.jar
- For a WAR file
cjimportres MyServer -type war -f account.war
- For a data source file
cjimportres MyServer -type datasource -resname JdbcDbpsv -c JdbcDbpsvConf.xml -f JdbcDbpsv.jar
- For a RAR file
cjimportres MyServer -type rar -f account.rar
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 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 data-source-display-name -resname); also, you cannot specify an option name in conjunction with a non-corresponding value (for example, you cannot specify -nameserver data-source-display-name -resname provider-URL).
-
If the DD file name <display-name> tag is not specified or if null is specified for the <display-name> tag, the file name is used as the displayed resource name. Note that if the file name includes characters other than all-purpose characters or half-byte English alphanumeric characters, those characters will be converted to underscores.
-
If you omitted Deployment Descriptor, the displayed resource name is converted as follows:
-
In the case of an EJB-JAR file (for EJB 3.0 or later), the displayed character string is the file name with the .jar extension removed.
-
In the case of a WAR file (for Servlet 2.5 or later), the displayed character string is the file name with the extension removed.
Note that for a file name in which a period appears only at the beginning, the extension is not removed. Also, if the name to be displayed includes a character other than a half-byte English alphanumeric character (0-9, A-Z, or a-z) or underscore (_), that character is converted to an underscore (_).
For a RAR file, the DD file cannot be omitted.
-
-
If following name is specified as RAR file name, the J2EE application operation might get disabled. Therefore, do not specify the following names in the RAR file name:
A name in which underscore (_) is specified before and after the symbol (For example: abc_+_001)
A name that ends with a symbol (For example: abc+)
-
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).
-
An EJB-JAR file with the same display name as a previously imported EJB-JAR file cannot be imported.
-
A WAR file with the same display name as a previously imported WAR file cannot be imported.
-
A RAR file with the same display name as a previously imported RAR file cannot be imported.
-
A data source that has the same display name as a previously imported data source or previously generated mail cannot be imported.
-
This command cannot import a RAR file that contains a native library.
-
If a display name is not specified for an EJB-JAR file, the file name (without .jar) of the EJB-JAR file is used as the file's display name.
The same applies for a RAR file.
For a WAR file as well, the file name is used as the display name. However, any characters other than alphanumeric characters and the underscore are replaced with an underscore. If there are contiguous characters to be replaced, they are replaced with a single underscore.
-
If multiple files are imported at the same time, this command attempts to import all the files even if there are files that cannot be imported.
-
There are additional notes related to the DDs of EJB-JAR files when an Enterprise Bean (EJB-JAR) is imported. For importing Enterprise Beans (EJB-JAR), see 7.2.1 Importing the Enterprise Beans (EJB-JAR) in the uCosminexus Application Server Application Setup Guide.
-
There are additional notes related to the DDs of WAR files when a servlet and JSP are imported. For importing servlets and JSPs, see 7.2.2 Importing the servlet and JSP (WAR) in the uCosminexus Application Server Application Setup Guide.
-
There are additional notes related to the DDs of RAR files when a resource adapter is imported. For importing resource adapters, see 7.2.3 Importing resource adapters (RAR files) in the uCosminexus Application Server Application Setup Guide.
-
If the display name of the RAR file or data source to be imported has more than 240 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.