cjgetresprop (get resource Property)

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:

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 Server 2012, Windows Server 2008, Windows 8, Windows 7, or Windows Vista).

Notes