Java Reference
In-Depth Information
Now that we have created our project, we need to add a couple of necessary JMS
resources, a JMS destination (Queue or Topic), and a JMS connection factory. When
using GlassFish as our application server, we can create these resources directly
from NetBeans.
Creating a JMS destination
JMS destinations are an intermediate location where JMS producers place messages,
and JMS consumers retrieve them. When using the
Point To Point
(
PTP
) Messaging
Domain, JMS destinations are message queues, where with the Publish/Subscribe
Messaging Domain, the destination is a message topic.
In our example we will be using the PTP messaging domain, therefore we need
to create a message queue, and the procedure to create a message topic is almost
identical.
In order to create a message queue, we need to click on
File | New File
, select
GlassFish
from the
Categories
list, and
JMS Resource
from the
File Types
list.