Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Developer's Guide

- Previous: To access an EJB component from an application client
- Next: Running an Application Client Using the ACC

## To access a JMS resource from an application client

1. Create a JMS client.

   For detailed instructions on developing a JMS client, see the J2EE 1.4 Tutorial at `http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JMS.html#wp84181`.

2. Next, configure a JMS resource on the Application Server.

   For information on configuring JMS resources, see Creating JMS Resources: Destinations and Connection Factories.

3. Define the `resource-ref` elements in the `application-client.xml` file and the corresponding `sun-application-client.xml` file.

   For more information on the `sun-application-client.xml` file, see The sun-application-client.xml file. For a general explanation of how to map JNDI names using reference elements, see Mapping References.

4. Ensure that the client JAR file includes the following files:

   - A Java class to access the resource.

   - `application-client.xml` - J2EE 1.4 application client deployment descriptor.

   - `sun-application-client.xml` - Application Server specific client deployment descriptor. For information on the `sun-application-client.xml` file, see The sun-application-client.xml file.

   - `The MANIFEST.MF` file. This file contains the main class, which states the complete package prefix and class name of the Java client.

   You can package the application client using the `package-appclient` script. This is optional. See Packaging an Application Client Using the ACC.

5. Copy the following JAR files to the client machine and include them in the classpath on the client side:

   - `appserv-rt.jar` - available at install-dir`/lib`

   - `j2ee.jar` - available at install-dir`/lib`

   - `imqjmsra.jar` - available at install-dir`/lib/install/aplications/jmsra`

   - The client JAR file

6. Run the application client.

   See Running an Application Client Using the ACC.

- Previous: To access an EJB component from an application client
- Next: Running an Application Client Using the ACC

- © 2010, Oracle Corporation and/or its affiliates