Book Image

Java EE 5 Development with NetBeans 6

Book Image

Java EE 5 Development with NetBeans 6

Overview of this book

Table of Contents (17 chapters)
Java EE 5 Development with NetBeans 6
Credits
About the Author
About the Reviewers
Preface
Identifying Performance Issues with NetBeans Profiler

Introduction to JMS


JMS is a standard Java EE 5 API that allows loosely coupled, asynchronous communication between Java EE components. Applications taking advantage of JMS do not interact directly with each other, instead JMS message producers send messages to a message destination (JMS Queue or Topic), and JMS message consumers receive messages from said destinations.

There are two messaging domains that can be used when working with JMS: the Point To Point (PTP) messaging, in which a JMS message is processed by only one message receiver; and Publish/Subscribe (pub/sub) messaging, in which all message receivers subscribed to a specific topic receive and process each message for said topic. JMS applications using the PTP messaging domains use message queues as their JMS destinations, whereas applications using pub/sub use message topics.

The following diagram illustrates the JMS architecture.

When working with JMS we need to obtain a reference to a connection factory, either via JNDI...