Book Image

Java EE 7 Development with NetBeans 8

By : David R Heffelfinger
5 (1)
Book Image

Java EE 7 Development with NetBeans 8

5 (1)
By: David R Heffelfinger

Overview of this book

Table of Contents (18 chapters)
Java EE 7 Development with NetBeans 8
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating JMS resources from NetBeans


Before we can send and receive JMS messages, we need to add a JMS destination (queue or topic) in our application server. When using GlassFish as our application server, we can create JMS destinations directly from any Java EE project in NetBeans.

Note

Older versions of Java EE required the creation of a JMS connection factory in addition to JMS destinations. The Java EE 7 specification requires all compliant application servers to supply a default JMS connection factory; therefore, this step is no longer necessary.

JMS destinations are an intermediate location where JMS producers place messages and JMS consumers retrieve them. When using the PTP messaging domain, JMS destinations are message queues, whereas with the pub/sub messaging domain, the destination is a message topic.

In our example, we will use the PTP messaging domain. Therefore, we need to create a message queue; the procedure to create a message topic is almost identical.

First, we need to create...