Assemble the application: Assemble the application client

The application assembly tool is used to package the application client files into an application client. The end result of assembling an application client is a JAR file that contains the application client files.

  1. Start the application assembly tool. On your workstation, select Start --> Programs -> IBM Websphere -> Application Server v5.0 -> Application Assembly Tool.

    Note: If you already have the application assembly tool open, select the File -> New -> Application Client menu item.

  2. The Welcome to the Application Assembly Tool window is displayed. On the New tab, click Application Client, and click OK.

    The application assembly tool uses a navigation bar to access various parts of the interface. The application client file has a default name and directory structure and contains general information.

  3. Set up general application client file information.

    • On the General tab, specify the following:

      • In the Display name field, specify PSSampleClient.
      • Optionally, you can specify a description in the Description field.
      • In the Classpath field, specify PSSampleMDB.jar.
      • Click Browse next to the Main Class field.
      • Click Browse next to the Root Directory or Archive field.
      • Locate the client.jar file in the /mdbsamp folder, and click Select.
      • Expand the com/ibm/websphere/samples/messaging/pubsub directory hierarchy.
      • Click JMSpsSampleClient.class.
      • Click OK.
      • Click Apply.

  4. Define the resource reference for the application client. The application client uses one TopicConnectionFactory resource reference.

    • Right-click Resource References, and click New.
    • Specify the following to define a TopicConnectionFactory resource:

      • In the Name field, specify jms/ConnectionFactory1.
      • In the Type field, select javax.jms.TopicConnectionFactory from the drop-down list.
      • In the Authentication field, select Application from the drop-down list.

    • Click OK.

  5. Set up resource environment references for the application client. The application client uses three resource environment references. Perform the following steps to set up the first resource environment reference:

    • Right-click Resource Environment References, and click New.
    • On the General tab, specify the following:

      • In the Name field, specify jms/news.
      • In the Type field, select javax.jms.Topic from the drop-down list.

    • On the Bindings tab, specify thisNode/servers/server1/Sample/JMS/news in the JNDI Name field, where server1 is the name of the server you are going to run the sample on. The term thisNode is a special value which is replaced by the WebSphere Application Server runtime with the name of the node to which your application server belongs. It should be entered as shown above.
    • Click OK.

  6. Set up resource environment references for the application client. The application client uses three resource environment references. Perform the following steps to set up the second resource environment reference:

    • Right-click Resource Environment References, and click New.
    • On the General tab, specify the following:

      • In the Name field, specify jms/sport.
      • In the Type field, select javax.jms.Topic from the drop-down list.

    • On the Bindings tab, specify thisNode/servers/server1/Sample/JMS/sport in the JNDI Name field, where server1 is the name of the server you are going to run the sample on.
    • Click OK.

  7. Set up resource environment references for the application client. The application client uses three resource environment references. Perform the following steps to set up the third resource environment reference:

    • Right-click Resource Environment References, and click New.
    • On the General tab, specify the following:

      • In the Name field, specify jms/weather.
      • In the Type field, select javax.jms.Topic from the drop-down list.

    • On the Bindings tab, specify thisNode/servers/server1/Sample/JMS/weather in the JNDI Name field, where server1 is the name of the server you are going to run the sample on.
    • Click OK.

  8. Save your application client.

    • Select the File -> Save menu item to save your application client in the mdbsamp folder.
    • Save your application client as PSSampleClient.jar.
    • Click OK.

  9. Select the File -> Close menu item to close the file.

Continue Next: Assemble the application