Setting up a JMS Resource on the Sun Java System Application Server

See Also

The JMS API allows loosely coupled, reliable, asynchronous interactions among Java EE components and legacy systems capable of messaging. You can add new behavior to a Java EE application that has existing business events by adding a new message-driven bean to operate on specific business events. Java EE components that use the JMS API within EJB or web containers must have no more than one JMS session per JMS connection. For more, see About Message-Driven Beans.

The JMS API uses two kinds of administered resource objects:

A JMS application normally uses at least one connection factory and at least one destination. The order in which the resources are created does not matter.

To create a JMS resource:

  1. Go to File > New (Ctrl-N).
  2. In the Project drop-down list, choose either your EJB module or Web module.
  3. Select Sun Resources in the Categories pane, JMS Resource in the File Types pane, and click Next.
  4. (required) Enter a JNDI name for the resource. JMS administered objects are usually placed within the jms naming subcontext (for example, jms/MyMessageSource).
  5. Enable or disable the resource by choosing true or false.
  6. Enter a description.
  7. To create a destination resource, choose one of the following admin object resource types: To create a connection factory, choose one of the following connector resource types:
  8. Click Next.
  9. Enter properties for the resource, if any.
  10. Click Finish.

Once you have created the object in your project, you need to register the resource with the server.

Connector Resources

When you register JMS resources, the IDE automatically registers connector resources. A connector resource is a program object that provides an application with a connection to an EIS. Multiple connector resources may specify a single connection pool. Applications locate a connector resource by doing a look up of the resource using its JNDI name.

When you register or delete JMS resources, the IDE automatically performs the following tasks:

Connector resources are visible in the Connectors node in the Runtime window.

For more on these types of communication and other aspects of JMS, see the Chapter 32 The Java Message Service in the Java EE 5 Tutorial:

See Also
Registering a Resource with the Sun Java System Application Server
About Message-Driven Beans

Legal Notices