
Developing Middleware in Java EE 8
By :

In the following sections, we are going to show how to send a text message from a servlet (acting as a producer) to a consumer (an MDB) using a topic destination.
As mention earlier, two administered objects are needed by JMS clients to start exchanging messages—destinations and connection factories. In this section, we are going to create those two administered objects to be used in our basic JMS example, from the GlassFish administration console. However, in a later section, we are going to show how can you define those administered objects from inside your application itself, using simple annotations.
Log in to your GlassFish administration console by browsing to http://localhost:9322
(change the port to the one bound to your GlassFish administration HTTP listener if necessary):
Common Tasks
pane, navigate to Resources
| JMS
Resources
| Destination
Resources
New
JNDI Name
, write jms/ticketsReservationTopic...