cjsetresprop (set Property of resource)
- Organization of this page
Format
- For an EJB-JAR or WAR file
cjsetresprop [server-name] [-nameserver provider-URL] -type {ejb|war} -resname resource-display-name[/lower-resource-display-name] -c Property-file-path
- For a data source file
cjsetresprop [server-name] [-nameserver provider-URL] -type datasource -resname data-source-display-name -c Property-file-path
- For mail
cjsetresprop [server-name] [-nameserver provider-URL] -type mail -resname mail-display-name -c Property-file-path
- For an RAR file
cjsetresprop [server-name] [-nameserver provider-URL] -type rar -resname resource-adapter-display-name -c Property-file-path
Function
This command changes the Property of the resources contained in an EJB-JAR file (EJB-JAR file, Session Bean, Entity Bean, and Message-driven Bean), the Property of the resources contained in a WAR file (WAR file, servlet/JSP, filter), the Property of a data source file, the Property of mail, or the Property of the resources contained in an undeployed RAR file, to the values specified in a property file.
If the display name of a lower resource is not specified, the specification is for the EJB-JAR or WAR file.
For the property files used to set up 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 resource that is to be set up:
-
ejb: Property of EJB-JAR file or the resources in an EJB-JAR file
-
war: Property of WAR file or the resources in a WAR file
-
datasource: Data source file
-
mail: Mail
-
rar: Property of 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 set up.
-
For an EJB-JAR file: EJB-JAR-file-display-name
-
For an EJB file: EJB-JAR-file-display-name[/Enterprise-Bean-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 an RAR file: RAR-file-display-name
-
- -c Property-file-path
-
Specifies the path of the input source property file.
Input examples
- For an EJB-JAR file
cjsetresprop MyServer -type ejb -resname accountJsp/MyAccount -c MyAccountProp.xml
- For a WAR file
cjsetresprop MyServer -type war -resname account-war/Account -c AccountProp.xml
- For a data source file
cjsetresprop MyServer -type datasource -resname JdbcDbpsv -c JdbcDbpsvProp.xml
- For mail
cjsetresprop MyServer -type mail -resname Mail -c MailProp.xml
- For an RAR file
cjsetresprop MyServer -type rar -resname account-ra -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 resource-display-name -resname); also, you cannot specify an option name in conjunction with a non-corresponding value (for example, you cannot specify -resname ejb -type resource-display-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).
-
The security-role/link-to values that are set in the property file are ignored. If the specified resource is a Session Bean, Entity Bean, or WAR file, the runtime value is also ignored.
-
The data source display name is substituted with the name specified in the <display-name> tag of the property file.
-
The resource display name is substituted with the name specified in the <display-name> tag of the property file.
-
When this command is executed for a data source, the specified data source name must exist.
When this command is executed for mail, the specified display name is handled as a new registration if it does not already exist. For a new registration, alphanumeric characters (0-9, A-Z, or a-z) or the following special characters can be used.
However, if names having a single-byte space at the beginning or end are specified, you can use the name by deleting the single-byte space. When a mail display name is set to the existing mail display name, the name is substituted with the name specified in the <display-name> tag of the property file.
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 (~).
-
If you set up the EJB-JAR property file when the <security-role-ref>-<role-link> tag is set up in the DD file (ejb-jar.xml), the value of the <security-role-ref>-<role-link> tag might be cleared in the DD file (ejb-jar.xml).