April 2018
Intermediate to advanced
382 pages
10h 11m
English
We start by asking the application server a JMS context instance:
@Injectprivate JMSContext context;
We also send a reference to the queue we want to work with:
@Resource(lookup = "jms/JmsQueue")private Destination queue;
Then, using the context, we create a producer to send the message to the queue:
context.createProducer() .setDeliveryMode(DeliveryMode.PERSISTENT) .setDisableMessageID(true) .setDisableMessageTimestamp(true) .send(queue, user);
Pay attention to these three methods:
Read now
Unlock full access