Hitachi

Hitachi Application Server V10 Command Reference Guide (For UNIX® Systems)


2.2.1 appclient

Launches the Application Client Container and invokes the client application typically packaged in the application JAR file.

Synopsis

appclient
    [client_application_classfile | -client client_application_jar]
    [-mainclass main_class_name | -name display_name]
    [-xml sun-acc.xml file] [-textauth]
    [-targetserver host[:port][,host[:port]...]] [-user username]
    [-passwordfile password_file] [application-options] 

appclient [jvm-options]
    [-mainclass main_class_name | -name display_name]
    [-xml client_config_xml_file] [-textauth]
    [-targetserver host[:port][,host[:port]...]] [-user username]
    [-passwordfile password_file]
    class-selector [application-options]

Storage location

Application Server installation directory/javaee/glassfish/bin

Function

The appclient launches the Application Client Container and invokes the client application that is typically packaged in an application JAR file. You can retrieve the client JAR file using the asadmin get-client-stubs command. The Application Client Container is a set of Java classes, libraries, and other files that are required to execute a first-tier application client program on Java VM. The Application Client Container communicates with the server using RMI-IIOP. The client JAR file that is retrieved after deploying an application should be passed with the -client or -jar option when running the appclient utility. The client JAR file name is of the form app-nameClient.jar. For multiple application clients in an EAR file, you must use the -mainclass or -name option to specify which client must be invoked. If the application client is a stand-alone module or the only client in an EAR file, the Application Client Container can find the client without using the -mainclass or -name option. If you provide a -mainclass or -name value that does not match the value in the client, the Application Client Container still launches the client but issues a warning that the selection did not match the value in the client. The warning also displays the actual main class and name values of the client.

You must give the absolute path locations. Else, the relative paths are used. The relative path is relative to the directory where the command is being executed.

Execution permission

Superuser

Environment variable

Files

Arguments

client_application_classfile

Indicates the file system pathname of the client application .class file. Providing this value is optional. To specify a relative path, describe a path that is relative to the current directory. This class file must contain the main() method to be invoked by the Application Client Container.

If you specify the client_application_classfile option and the specified class is dependent on other user classes, you must also set the classpath.

Type: String

The following values can be specified:

  • Path of application .class file

Default value: N/A

-client client_application_jar

Specifies the name and location for the client JAR file. Providing this value is optional.

Type: String

The following values can be specified:

  • Name of the client jar

Default value: N/A

-mainclass main_class_name

Indicates the full class name of the main client application, as specified in the Main-Class entry of the MANIFEST.MF file. Providing this value is optional. Used for a multiple client applications.

Type: String

The following values can be specified:

  • Class name

Default value:

Class specified in the client jar when multiple client applications are present.

-name display_name

Indicates the display name for the client application. Providing this value is optional. Used for multiple client applications.

Type: String

The following values can be specified:

  • Display name

Default value:

Value set to display-name attribute of application-client.xml file in client jar.

-xml sun-acc.xml file

Indicates the name and location of the client configuration XML file. Providing this value is optional, if you are using the default domain, instance, and name (sun-acc.xml). Else, it is required.

Type: String

The following values can be specified:

  • Name of the configuration file

Default value:

sun-acc.xml file in the domain-dir/config directory.

-textauth

Specifies the text format authentication when authentication is needed. Providing this value is optional.

-targetserver host:port

Indicates a comma-separated list of one or more server specifications for ORB endpoints. Providing this value is optional. Each server specification must include at least the host. Optionally, a server specification can include the port as well.

If the port is omitted from a server specification, the default value, 3700, is used for that host.

Type: String

The following values can be specified:

  • One or more comma separated server specifications

Default value: N/A

-user username

Indicates the application user who is authorized to have access to particular guarded components in the application, such as EJB components. Providing this value is optional.

Type: String

The following values can be specified:

  • User name

Default value: N/A

-passwordfile password_file

Specifies the name, including the full path, of a file that contains the password for application clients in the format, PASSWORD=appclient-password.

Providing this value is optional.

For security reasons, a password that is specified as an environment variable is not read by the appclient utility.

Type: String

The following values can be specified:

  • Path of the password file

Default value: N/A

jvm-options

Allows you to set JVM options for the client application. Providing this value is optional. These can be any valid java command options except -client or -jar. JVM options can be intermixed with other appclient command options as long as both types of options appear before class-selector.

class-selector

Indicates the client application class to be specified using one of the following class selectors. Providing this value is mandatory.

Type: String

The following values can be specified:

  • -jar jar-file

    the name and location of the client JAR file. The application client JAR file is specified and created during deployment by the asadmin deploy command. If specified, the -classpath setting is ignored in deference to the Class-Path setting in the client JAR file's manifest.

  • class-name

    the fully qualified name of the application client's main class. The Application Client Container invokes the main method of this class to start the client.

Default value: N/A

application-options

Enables you to set client application arguments. Providing this value is optional.

Type: String

The following values can be specified:

  • Client application arguments

Default value: N/A

Examples

Where: sun-acc.xml is the name of the client configuration XML file, myclientapp.jar is the client application .jar file, and scott and sample are arguments to pass to the application. If sun-acc.xml and myclientapp.jar are not in the current directory, you must give the absolute path locations; else the relative paths are used. The relative path is relative to the directory where the command is being executed.

appclient -xml sun-acc.xml -jar myclientapp.jar scott sample