cjgetresprop (get resource Property)
- Organization of this page
Format
- For an EJB-JAR or WAR file
cjgetresprop [server-name] [-nameserver provider-URL] -type {ejb|war} -resname resource-display-name[/lower-resource-display-name] [-encoding code-set-name] -c Property-file-path- For a data source file
cjgetresprop [server-name] [-nameserver provider-URL] -type datasource -resname data-source-display-name [-encoding code-set-name] -c Property-file-path- For mail
cjgetresprop [server-name] [-nameserver provider-URL] -type mail -resname mail-display-name [-encoding code-set-name] -c Property-file-path- For a RAR file
cjgetresprop [server-name] [-nameserver provider-URL] -type rar -resname resource-adapter-display-name [-encoding code-set-name] -c Property-file-path
Function
This command obtains the Property of the resources (EJB-JAR file, Session Bean, Entity Bean, and Message-driven Bean) contained in an EJB-JAR file, the Property of the resources (WAR file, servlet/JSP, and filter) contained in a WAR file, or the Property of the resources contained in a data source file, mail, or an undeployed RAR file, and generates a property file.
If the display name of the lower resource is not specified, the specification becomes that of an EJB-JAR or WAR file.
For the property files used during setup of J2EE applications and resources, see the following locations:
-
3. Property Files Used for Setting J2EE Applications in the uCosminexus Application Server Application and Resource Definition Reference Guide.
-
4. Property Files Used for Setting Resources in the uCosminexus Application Server Application and Resource Definition Reference Guide.
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 property file to be generated:
-
ejb: Property file for an EJB-JAR file or the resources in an EJB-JAR file
-
war: Property file for a WAR file or the resources in a WAR file
-
datasource: Data source property file
-
mail: Mail property file
-
rar: Property file for an undeployed RAR file
-
- -resname resource-display-name, data-source-display-name, mail-display-name, or resource-adapter-display-name
-
Specifies the display name of the resource to be retrieved:
-
For an EJB-JAR file: EJB-JAR-file-display-name
-
For an EJB file: EJB-JAR-file-display-name[/EJB-file-display-name]
-
For a WAR file: WAR-file-display-name
-
For a servlet/JSP: WAR-file-display-name[/servlet/JSP-display-name]
-
For a filter: WAR-file-display-name[/filter-display-name]
-
For data source file: Data-source-file-display-name
-
For mail: Mail-display-name
-
For a RAR file: RAR-file-display-name
-
- -encoding code-set-name
-
Specifies the name of the code set to be used when the property file is output. The following code set names can be specified:
-
UTF8
-
UTF-8
-
ASCII
-
US-ASCII
-
ISO-8859-1
-
EUC_JP
-
Shift_JIS
-
SJIS
-
windows-31j
-
MS932
-
Code sets supported by JavaVM
If this argument is omitted, the default-encoding name of JavaVM is used. To confirm the used encoding name, see the XML declaration in the first line of the property file acquired with the cjgetresprop command.
<?xml version="XML-standard-version-number" encoding="code-set-name"?>
-
- -c Property-file-path
-
Specifies the output destination path of the property file.
Input examples
- For an EJB-JAR file
cjgetresprop MyServer -type ejb -resname accountJsp/MyAccount -encoding Shift_JIS -c MyAccountProp.xml
- For a WAR file
cjgetresprop MyServer -type war -resname account-war/Account -encoding UTF-8 -c AccountProp.xml
- For a data source file
cjgetresprop MyServer -type datasource -resname JdbcDbpsv -c JdbcDbpsvProp.xml
- For mail
cjgetresprop MyServer -type mail -resname Mail -c MailProp.xml
- For a RAR file
cjgetresprop MyServer -type rar -resname account-rar -encoding Shift_JIS -c AccountProp.xml
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 J2EE-application-name -name); also, you cannot specify an option name in conjunction with a non-corresponding value (for example, you cannot specify -name ejb -type J2EE-application-name).
-
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).
-
If a property file already exists on the specified path, it is overwritten.