cjaddapp (add resource)

Format

For an EJB-JAR, WAR, or RAR file

cjaddapp [server-name] [-nameserver provider-URL]
    -type {ejb|war|rar} -name J2EE-application-name
    -resname display-name [-resname display-name ...]

For a filter

cjaddapp [server-name] [-nameserver provider-URL]
    -type filter -name J2EE-application-name
    -warname WAR-file-display-name
    -c Property-File-path [-c Property-File-path ...]

Function

For an EJB-JAR, WAR, or RAR file
If there is a J2EE application, this command adds an imported EJB-JAR, WAR, or RAR file to the J2EE application. This command can add multiple files at once, in which case the files are processed in the sequence in which they are specified.
If there is no J2EE application, this command creates a new J2EE application and then adds an imported EJB-JAR, WAR, or RAR file to the J2EE application.
For a filter
If there is a J2EE application with a WAR file, this command adds a filter to the specified WAR file. The HITACHI Filter Property File specified with the -c option specifies the filter to be added. This command can add multiple filters at once, in which case the filters are processed in the sequence in which they are specified.
If there is no J2EE application or there is no WAR file, an error occurs.

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|rar|filter}
Specifies the type of resource to be added:
  • ejb: EJB-JAR file
  • war: WAR file
  • rar: RAR file
  • filter: Filter
-name J2EE-application-name
Specifies the name of the J2EE application. The J2EE application name must be a character string consisting of at least one character.
If you are creating a new J2EE application, you can use alphanumeric characters (0-9, A-Z, or a-z) or the following special characters in the name:
plus (+), hyphen (-), period (.), caret (^), underscore (_)
-resname display-name
Specifies the display name of the EJB-JAR, WAR, or RAR file that is to be added.
-warname WAR-file-display-name
Specifies the display name of the WAR file to which the filter is to be added.
-c Property-File-path
Specifies the input source path of the HITACHI Filter Property File.

Input examples

EJB-JAR file

cjaddapp MyServer -type ejb -name App1 -resname accountJsp

WAR file

cjaddapp MyServer -type war -name App1 -resname account-war

RAR file

cjaddapp MyServer -type rar -name App1 -resname account-rar

Filter

cjaddapp MyServer -type filter -name App1 -warname account-war -c FilterProp.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