A messaging system can be a powerful tool for integrating disparate applications. It provides an asynchronous model of programming. The client does not wait for the response from the server and the server does not necessarily process requests at the same time that the client sends them. A messaging system can also be useful for building scalable applications and batch processing. JMS provides uniform APIs to access different messaging systems.
In this chapter, we learned how to send and receive messages from queues and to publish and subscribe messages from topics. There are many different ways to use JMS APIs. We started with the basic JMS APIs and then learned how annotations can help reduce some of the code. We also learned how to use MDBs to consume messages.
In the next chapter, we will see some of the techniques and tools used for profiling CPU and memory usages...