cjcopyres (copy resource)
- Organization of this page
Format
cjcopyres [server-name] [-nameserver provider-URL] -type {ejb|war|datasource|mail|rar} -src copy-source-display-name -dst copy-destination-display-name
Function
This command copies the properties of a resource (EJB-JAR file, WAR file, data source file, mail, or RAR file).
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|mail|rar}
-
Specifies the type of resource to be copied:
-
ejb: EJB-JAR file
-
war: WAR file
-
datasource: Data source file
-
mail: Mail
-
rar: RAR file
-
- -src copy-source-display-name
-
Specifies the display name of the EJB-JAR, WAR, data source file, mail, or RAR file that is the copy source.
- -dst copy-destination-display-name
-
Specifies the display name of the EJB-JAR, WAR, data source file, mail, or RAR file that is to be the copy destination.
You can use alphanumeric characters (0-9, A-Z, and a-z) or the following special characters in the display name.
However, the special characters that can be specified differ according to the resource types specified in the -type option.
- The following are the special characters that can be used when ejb, war, or rar is specified:
-
plus (+), hyphen (-), period (.), caret (^), underscore (_).
- The following are the special characters that can be used when mail is specified:
-
space ( ), exclamation mark (!), hash mark (#), dollar sign ($), percent (%), ampersand (&), parentheses ( ( ) ( ) ), plus (+), hyphen (-), period (.), semicolon (;), less-than sign ( < ), greater than sign ( > ), at mark (@), square brackets ( [ ) ( ] ), yen sign (
), caret (^), underscore (_), grave accent mark (`), curly brackets ( {) ( }), vertical bar (|), tilda (~).
However, if names having a single-byte space at the beginning or end are specified, the names are used with the single-byte space removed.
- The following is the special character that can be used when datasource is specified:
-
underscore (_)
Note that you cannot specify the following names when mail is specified. If you specify these names, an error will occur.
-
Name having a single-byte space at the beginning or end
-
Names having two or more consecutive single-byte spaces in the character string
Input examples
- For an EJB-JAR file
cjcopyres MyServer -type ejb -src accountJsp -dst accountJsp2
- For a WAR file
cjcopyres MyServer -type war -src account-war -dst account_war2
- For a data source file
cjcopyres MyServer -type datasource -src JdbcDbpsv -dst JdbcDbpsv2
- For mail
cjcopyres MyServer -type mail -src Mail -dst Mail2
- For an RAR file
cjcopyres MyServer -type rar -src account-ra -dst account-ra2
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
-
The display name specified as the copy destination must not exist.
-
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 the display name of the data source file, mail, or RAR file specified in the copy destination display name has more than 240 characters, an error occurs.
-
If the following names are specified in the display name of the RAR file that is to be copied, you might be unable to operate J2EE applications. Therefore, do not specify the following names in the display name of the RAR file:
-
Names in which an underscore (_) is specified before and after the symbol (For example: abc_+_001)
-
Names ending with a symbol (For example: abc+)
-