Launches a J2EE WebSphere Application Client. It first creates the Application Client
runtime that initializes the JNDI name space with the client application's EJB's and resources,
and then it launches the client application.
The Properties parameter is for setting Application Client runtime properties.
The list of valid properties is:
- verbose=<true|false>
- Outputs the parsed arguments, classpath, and other informational messages,
which are useful for debugging. A value of true turns verbose on, and
false turns it off. The default is false.
- classpath=a classpath value
- When an application is launched the system classpath is not used. If you need to
access classes that are not in the ear file or part of the resource classpaths,
specify the appropriate classpath here. Multiple paths may be concatenated.
- jar=jarfilename
- The name of the client application jar file within the ear file that contains
the client application you wish to launch. This argument is only necessary when there are
multiple client application jar files in the ear file; otherwise, launchClient will locate the
client application. Generally, it is only necessary to specify the jar file name, but if
the jar file was added to the ear file with a path, you will have to specify the path
(relative to the root of the ear) as well. It is recommended you store the jar file
in the root, however.
- altDD=AlternateDeploymentDescriptor
- The name of an Alternate Deployment Descriptor. This must be used with jar property
and is used to specify which Deployment Descriptor to use. This property is only
necessary when a client jar file is configured with more than one
Deployment Descriptor.
- BootstrapHost=your.server.ofchoice.com
- The name of the host server you wish to connect to initially. This value is used to create
a provider URL for Enterprise Java Bean and Resource Environment References and also to set
the java.naming.provider.url system property. For compatibility, this value will also be
mapped to the system property com.ibm.CORBA.BootstrapHost.
- BootstrapPort=<nnnn>
- The server port number to use. This value is used to create
a provider URL for Enterprise Java Bean and Resource Environment References and also to set
the java.naming.provider.url system property. For compatibility, this value will also be
mapped to the system property com.ibm.CORBA.BootstrapPort.
- providerURL=<Any valid provider url string>
- This value is used to provide bootstrap server information that the initial context factory can use to obtain an initial context.
WebSphere's initial context factory can use either a CORBA object URL or an IIOP URL.
CORBA object URLs are more flexible than IIOP URLs and are the recommended URL format to use.
This value can contain more than one bootstrap server address. This feature can be used when attempting to obtain an initial context from a server cluster.
The bootstrap server addresses for all servers in the cluster can be specified in the URL.
The operation will succeed if at least one of the servers is running, eliminating a single point of failure.
There is no guarantee of any particular order in which the address list will be processed.
For naming operations, this value overrides -CCBootstrapHost and -CCBootstrapPort parameters.
An example of a CORBA object URL specifying multiple systems: providerURL=corbaloc:iiop:myserver.mycompany.com:9810,:mybackupserver.mycompany.com:2809
For more information, see the naming sections of the InfoCenter.
This value is also mapped to the system property java.naming.provider.url.
- trace=<true|false>
- Use this option to have WebSphere write debug trace information to a file. You may
need this information when reporting a problem to IBM Service.
- tracefile=tracefilename
- The path/name of the file to write trace information to. The file will be created
if it doesn't exist.
- initonly=<true|false>
- This option is intended for ActiveX applications to initialize the Application Client
runtime without launching the client application.
- securityManager=<enable|disable>
- Use this option to have WebSphere enable and run with a security manager.
The default is disable.
- securityMgrClass=securitymanagerclassname
- The fully qualified name of a class that implements a security manager.
This is only used if securityManager is set to "enable".
The default is java.lang.SecurityManager.
- securityMgrPolicy=securitymanagerpolicyfilename
- The name of a security manager policy file. This value is mapped to system
property java.security.policy and is only used if securityManager is set to "enable".
If not specified, the default is <product_installation_directory>/properties/client.policy.
- D<property key>=<property value>
- Use this option to have WebSphere set the specified system property during initialization.
Do not use the = character after the D. For example: Dcom.ibm.test.property=testvalue
You may specify multiple D<property key>=<property value> properties.
- exitVM=<true|false>
- Use this option to have WebSphere call System.exit() after the client application has completed.
The default is false.
- soapConnectorPort=<nnnn>
- The soap connector port to use. If no port is entered, a default port will be used.
- dumpJavaNameSpace=<true|false|long>
- Prints out the java: portion of the WebSphere JNDI name space.
Specifying the value true uses the short format which prints out the binding name and
the type of the object bound at that location. Specifying the value long uses the long
format which prints out the binding name, bound object type, local object, type, and string representation of the local object (i.e.
IORs, string values, etc.).
The default is false.
Here's a programming example:
FileInputStream fis = new FileInputStream("c:\\production\\myapp.properties");
Properties p = new Properties();
p.load(fis);
p.setProperty("verbose", "true");
p.setProperty("classpath", "c:\abc\def.jar;c:\mystuff.jar");
String myargs[] = {"-store=12345", "-unit=#77211", "-verbose", "minneapolis"};
launchClient lc = new launchClient();
lc.launch("c:\\production\\myapp.ear", p, myargs);