Adding message destinations

J2EE 1.4 components can refer to message destination objects by using "logical" names called message destination references. You can use the deployment descriptor editors to define message destinations for J2EE 1.4 components.

Message destinations are elements that specify logical message destinations within an application. The message-destination element defines a message-destination-name, which is used for the purpose of linking. Message destinations can be defined in any module in the J2EE application as the referencing component. A message destination link on a message destination reference or a message-driven bean points to the name of a message destination.

At deployment, the message destination references are bound to the administered message destinations in the target operational environment.

Restriction: Only the following minimum project levels can include message destinations:
  • J2EE 1.4 Application Clients
  • EJB 2.1 projects
  • 2.4 Web Applications

For each message destination that you define, a message-destination element is added to the deployment descriptor for that application component.

The following code shows an example message destination defined in a deployment descriptor:

<message-destination>
	<description></description>
	<message-destination-name>MyDest</message-destination-name>
</message-destination-ref>

To define a message destination:

  1. Open the deployment descriptor editor for the module project where you want to add a message destination. To do this, in the Project Explorer of the J2EE perspective, double-click the Deployment Descriptor node for your project. The appropriate deployment descriptor for your module type opens.
  2. In the Message Destinations section of the editor, click the Add button. This section is on different pages of the editor depending on the module type:
    • Application client modules: Overview page
    • Dynamic Web modules: Variables page
    • EJB modules: Assembly page
  3. In the Name field, specify a name for the message destination. The value entered in the Name field is used in the message-destination-name element in the deployment descriptor and is the value that could be used by a message destination reference or message-driven bean as its message-destination-link element.
  4. In the Description text area, enter a description for the message destination.
  5. Click Finish.
The message destination is added to the deployment descriptor. Now, when you define message destination references, you can link to this message destination. In the Message Driven Destinations section of the editor, you can select the message destination and change the name and description. You can also remove the message destination.
Related tasks
Defining references in J2EE modules
Adding message destination references
Terms of use | Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.