The J2EETM Tutorial
Home
TOC
Index
PREV TOP NEXT Search
Feedback

deploytool Tips for JMS Clients

For more information on JMS clients, please see the Java Message Service Tutorial:

http://java.sun.com/products/jms/tutorial/index.html

Setting the Resource References

  1. In the tree view, select the client's node.
  2. Select the Resource Refs tab.
  3. Click Add.
  4. In the Coded Name field, enter the name that matches the parameter of the lookup method in the client's code. For example, if the lookup parameter is java:comp/env/jms/MyQueueConnectionFactory, the Coded Name should be jms/QueueConnectionFactory.
  5. In the Type field, select the connection factory class that matches the destination type.
  6. In the Authentication field, in most cases you will select Container. You would select Application if your code explicitly logs on to the messaging service.
  7. In the Sharable field, make sure the checkbox is selected. This choice allows the container to optimize connections.
  8. Enter strings in the User Name and Password fields. The authentication service of the J2EE SDK will prompt you for these fields when you run the client.

Setting the Resource Environment References

  1. Select the Resource Env. Refs tab.
  2. Click Add.
  3. In the Coded Name field, enter a name that matches the parameter of the lookup call that locates the queue or topic. For example, if the lookup parameter is java:comp/env/jms/QueueName, the Coded Name should be jms/QueueName.
  4. In the Type field, select the class that matches the destination type.

Specifying the JNDI Names

  1. In the tree view, select the application's node.
  2. Select the JNDI Names tab and enter the appropriate names. For example, the SimpleMessageApp discussed in this chapter uses the JNDI names shown in Table 7-1.

    Table 7-1 JNDI Names for the SimpleMessageApp Application
    Component or Reference Name
    JNDI Name
    SimpleMessageEJB
    jms/MyQueue
    jms/MyQueueConnectionFactory
    jms/QueueConnectionFactory
    jms/QueueName
    jms/MyQueue
Home
TOC
Index
PREV TOP NEXT Search
Feedback