Starting the runtime container

The runtime container enables the application client to look up EJB and resource references. The container also provides security and authenticates the client when the application is started.

Run application clients using the script run-appclient.bat (on Windows) or run-appclient.sh (on UNIX). The script takes the following arguments:

-client <appclient_name | appclient_jar | application_ear> [ -name <appclient_name> [-login <boolean>] [-systemProperties propsFile]

Option

Description

-client

Required, to specify one of the following:

  • The application client name, as displayed in the Management Console. This option works for all clients and does not require the deployment archive to be present.

  • The application client JAR file name and path, if the client was deployed from a standalone JAR file.

  • The application EAR file name and path, if the client was deployed from the EAR file. Also specify the application client name with the -name option.

-name

When you specify an application EAR file for the -client option, specify the name of the application client inside the EAR with this option. The name must match the base name of the application client JAR file inside the EAR file. For example:

-client C:\apps\myapp.ear -name myappclient

-login

If you specify true for this option, the script prompts the user for login credentials. If you do not specify this option, the default is false.

-systemProperties

Specifies the name and path to a file that contains InitialContext property settings for the client. For example, to specify a user name and password, create a file that contains this text:

java.naming.security.principal=Guest
java.naming.security.credentials=Guest123

An alternate way to specify properties is to configure an EJB or JMS provider on the General tab properties for the client—see “General tab”.

This example illustrates the command-line syntax to start an application client’s runtime container, where my_client is the name of the client. On Windows, the command is:

runclient -client my_appclient -login true

On UNIX, the command is:

runclient.sh -client my_appclient -login true