Chapter 8. JMS

The Java Messaging Service (JMS) has become the de facto standard for accessing message-oriented middleware products. It equips the Java developer with a powerful programming model that facilitates asynchronous, decoupled communication. WebLogic provides both the point-to-point and publish-and-subscribe models, as well as message persistence, flow control, guaranteed delivery, message redelivery, expiry, paging, concurrent message handling, and more. By supporting all of these features and enhancements, WebLogic offers a rich and robust framework for creating portable JMS applications that can operate and scale in a clustered environment.

All of the messaging facilities are implemented by a JMS server, which is pinned to a particular WebLogic instance. The JMS server in turn hosts a number of destinations (either topics or queues) with which clients can interact. In order to connect to the JMS server, you need to set up one or more connection factories. A connection factory encapsulates a number of properties that typically apply to all connections (and sessions) manufactured by it. Both the connection factories and JMS destinations are available in the server’s JNDI tree.

WebLogic provides a number of ways to tune the performance of the JMS server. You can set up quotas that limit the number of messages that can be held in the server’s memory, and enable paging so that the messages held in memory can be swapped out to a persistent store under threshold conditions. ...

Get WebLogic: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.