O'Reilly logo

Mastering Spring Application Development by Anjana Mankale

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

JMS transactions

In this section, let's see how we can include transactions in messaging. We shall first demonstrate messaging without transactions using a few scenarios. We shall first describe the scenarios and write a test case. Then, we shall develop an application around it. We shall demonstrate sending messages using the convertandsendmessage() method.

  • Scenario 1: This is a positive use case, which we have seen in previous sections as well.
    JMS transactions
    @Test public void testCorrectMessage() throws InterruptedException { Order order = new Order(0, "notification to deliver correctly"); ordersender.convertAndSendMessage(QUEUE_INCOMING, order); Thread.sleep(6000); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required