Chapter 12. Messaging in Spring

 

This chapter covers

  • Introduction to the Java Message Service (JMS)
  • Sending and receiving asynchronous messages
  • Message-driven POJOs

It’s 4:55 p.m. on Friday. You’re minutes away from starting a much-anticipated vacation. You have just enough time to drive to the airport and catch your flight. But before you pack up and head out, you need to be sure that your boss and colleagues know the status of the work you’ve been doing so that they can pick up where you left off on Monday. Unfortunately, some of your colleagues have already skipped out for an early weekend departure... and your boss is tied up in a meeting. What do you do?

You could call your boss’s cell phone... but it’s not necessary to interrupt his meeting for a mere status report. Maybe you could stick around and wait until he returns from the meeting. But it’s anyone’s guess how long the meeting will last and you have a plane to catch. Perhaps you could leave a sticky note on his monitor... right next to 100 other sticky notes that it’ll blend in with.

The most practical way to communicate your status and still catch your plane is to send a quick email to your boss and your colleagues, detailing your progress and promising to send a postcard. You don’t know where they are or when they’ll read the email, but you do know that they’ll eventually return to their desks and read it. Meanwhile, you’re on your way to the airport.

12.1. A brief introduction to JMS

 
 
 
 

12.2. Setting up a message broker in Spring

 
 
 

12.3. Using Spring’s JMS template

 
 

12.4. Creating message-driven POJOs

 
 
 

12.5. Using message-based RPC

 
 

12.6. Summary

 
 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest