Sun Java System Application Server Platform Edition 8.1 2005Q2 Update 2 Developer's Guide

- Previous: Deploying a Lifecycle Module
- Next: Deploying a J2EE CA Resource Adapter

## Deploying an Application Client

Deployment is only necessary for application clients that communicate with EJB components.

### To deploy an application client

1. Assemble the necessary client files.

2. Assemble the EJB components to be accessed by the client.

3. Package the client and EJB components together in an application.

4. Deploy the application as described in Tools for Deployment.

5. Retrieve the client JAR file.

   The client JAR file contains the ties and necessary classes for the ACC client.

   You can use the `--retrieve` option to get the client JAR file.

   You can also use the `asadmin get-client-stubs` command to retrieve the stubs and ties whether or not you requested their generation during deployment. For details, see the Sun Java System Application Server Platform Edition 8.1 2005Q2 Update 2 Reference Manual.

6. Copy the client JAR file to the client machine, and set the APPCPATH environment variable on the client to point to this JAR.

##### Next Steps

To execute the client on the Application Server machine to test it, use the `appclient` script in the install-dir`/bin` directory.The only required option is `-client`. For example:

`appclient -client converterClient.jar`

The `-xml` parameter specifies the location of the `sun-acc.xml` file.

##### See Also

For more detailed information about the `appclient` script, see Chapter 8, Developing Java Clients.

### To prepare another machine for executing an application client

1. You can use the `package-appclient` script in the install-dir`/bin` directory to create the ACC package JAR file. This is optional.

   This JAR file is created in the install-dir `/lib/appclient` directory.

2. Copy the ACC package JAR file to the client machine and unjar it.

3. Configure the `sun-acc.xml` file.

   This file is located in the `appclient/appserv/lib/appclient` directory by default if you used the `package-appclient` script.

4. Configure the `asenv.conf` (`asenv.bat` on Windows) file.

   This file is located in `appclient/appserv/bin` by default if you used the `package-appclient` script.

5. Copy the client JAR file to the client machine.

   You are now ready to execute the client.

##### See Also

For more detailed information about the `package-appclient` script, see Chapter 8, Developing Java Clients.

- Previous: Deploying a Lifecycle Module
- Next: Deploying a J2EE CA Resource Adapter

- © 2010, Oracle Corporation and/or its affiliates