|Oracle® Fusion Middleware Configuring and Managing JMS for Oracle WebLogic Server
11g Release 1 (10.3.3)
Part Number E13738-03
The following sections describe the contents and organization of this guide—Configuring and Managing JMS for Oracle WebLogic Server.
This document is a resource for system administrators who configure, manage, and monitor WebLogic JMS resources, including JMS servers, stand-alone destinations (queues and topics), distributed destinations, and connection factories.
The document is relevant to production phase administration, monitoring, and performance tuning. It does not address the pre-production development or testing phases of a software project. For links to WebLogic Server documentation and resources for these topics, see Related Documentation.
It is assumed that the reader is familiar with WebLogic Server system administration. This document emphasizes the value-added features provided by WebLogic Server JMS and key information about how to use WebLogic Server features and facilities to maintain WebLogic JMS in a production environment.
This chapter, Chapter 1, "Introduction and Roadmap," describes the organization and scope of this guide.
Chapter 2, "Understanding JMS Resource Configuration," is an overview of WebLogic JMS architecture and features.
Chapter 3, "Configuring Basic JMS System Resources," describes how to configure basic WebLogic JMS resources, such as a JMS server, destinations (queues and topics), and connection factories.
Chapter 4, "Configuring Advanced JMS System Resources," explains how to configure clustering JMS features, such as JMS servers, migratable targets, and distributed destinations.
Chapter 5, "Configuring JMS Application Modules for Deployment," describes how to prepare JMS resources for an application module that can be deployed as a stand-alone resource that is globally available, or as part of an Enterprise Application that is available only to the enclosing application.
Chapter 6, "Using WLST to Manage JMS Servers and JMS System Module Resources," explains how to use the WebLogic Scripting Tool to create and manage JMS resources programmatically.
Chapter 7, "Interoperating with Oracle AQ JMS," provides information on how to interoperate with Oracle AQ JMS.
Chapter 8, "Monitoring JMS Statistics and Managing Messages," describes how to monitor and manage the run-time statistics for your JMS objects from the Administration Console.
Chapter 9, "Best Practices for JMS Beginners and Advanced Users," provides advice and best practices for beginning and advanced JMS users.
Chapter 10, "Troubleshooting WebLogic JMS," explains how to configure and manage message logs, and how to temporarily pause message operations on destinations.
This document contains JMS-specific configuration and maintenance information.
For comprehensive information on developing, deploying, and monitoring WebLogic Server applications:
Programming JMS for Oracle WebLogic Server is a guide to JMS API programming with WebLogic Server.
"Understanding WebLogic Server Clustering" in Using Clusters for Oracle WebLogic Server explains how WebLogic Server clustering works.
Deploying Applications to Oracle WebLogic Server is the primary source of information about deploying WebLogic Server applications, which includes standalone or application-scoped JMS resource modules.
"Using the WebLogic Persistent Store" in Configuring Server Environments for Oracle WebLogic Server describes the benefits and use of the system-wide WebLogic Persistent Store.
Configuring and Managing Store-and-Forward for Oracle WebLogic Server describes the benefits and use of the Store-and-Forward service with JMS messages.
WebLogic Tuxedo Connector Administration Guide for Oracle WebLogic Server explains how to configure a messaging bridge between any two messaging products—thereby providing interoperability between separate implementations of WebLogic JMS, including different releases, or between WebLogic JMS and another messaging product.
Performance and Tuning for Oracle WebLogic Server contains information on monitoring and improving the performance of WebLogic Server applications, including information on how to get the most out of your JMS applications by using the administrative performance tuning features available with WebLogic JMS.
In addition to this document, Oracle provides JMS code samples and tutorials that document JMS configuration, API use, and key JMS development tasks. Oracle recommends that you run some or all of the JMS examples before configuring your own system.
MedRec is an end-to-end sample Java EE application shipped with WebLogic Server that simulates an independent, centralized medical record management system. The MedRec application enables patients, doctors, and administrators to manage patient data using a variety of different clients.
MedRec demonstrates WebLogic Server and Java EE features, and highlights Oracle-recommended best practices. MedRec is included in the WebLogic Server distribution, and can be accessed from the Start menu on Windows machines. For Linux and other platforms, you can start MedRec from the
\samples\domains\medrec directory, where
WL_HOME is the top-level installation directory for WebLogic Platform.
This release of WebLogic Server optionally installs API code examples in
WL_HOME is the top-level directory of your WebLogic Server installation. You can start the examples server, and obtain information about the samples and how to run them from the WebLogic Server Start menu.
For a comprehensive listing of the new WebLogic Server features introduced in this release, see What's New in Oracle WebLogic Server.
WebLogic JMS provides numerous WebLogic JMS Extension APIs that go above and beyond the standard JMS APIs specified by the JMS 1.1 Specification, available at
http://java.sun.com/products/jms/docs.html. Moreover, it is tightly integrated into the WebLogic Server platform, allowing you to build secure Java EE applications that can be easily monitored and administered through the WebLogic Server console. In addition to fully supporting XA transactions, WebLogic JMS also features high availability through its clustering and service migration features, while also providing interoperability with other versions of WebLogic Server and third-party messaging providers.
The following sections provide an overview of the unique features and powerful capabilities of WebLogic JMS.
WebLogic JMS includes the following reliability features:
Out-of-the-box transaction support:
Fully supports transactions, including distributed transactions, between JMS applications and other transaction-capable resources using the Java Transaction API (JTA), as described in "Using Transactions with WebLogic JMS" in Programming JMS for Oracle WebLogic Server.
Fully-integrated Transaction Manager, as described in "Introducing Transactions" in Programming JTA for Oracle WebLogic Server.
File or database persistent message storage (both fully XA transaction capable). See "Using the WebLogic Persistent Store" in Configuring Server Environments for Oracle WebLogic Server.
Message Store-and-Forward (SAF) is clusterable and improves reliability by locally storing messages sent to unavailable remote destinations. See "Understanding the Store-and-Forward Service" in Configuring and Managing Store-and-Forward for Oracle WebLogic Server.
If a server or network failure occurs, JMS producer and consumer objects will attempt to transparently failover to another server instance, if one is available. See "Automatic JMS Client Failover" in Programming JMS for Oracle WebLogic Server.
Supports connection clustering using connection factories targeted on multiple WebLogic Servers, as described in Configuring WebLogic JMS Clustering.
System-assisted configuration of Uniform Distributed Destinations that provide high availability, load balancing, and failover support in a cluster, as described in "Using Distributed Destinations" in Programming JMS for Oracle WebLogic Server.
Automatic whole server migration provides improved cluster reliability and server migration WebLogic Server now supports automatic and manual migration of a clustered server instance and all the services it hosts from one machine to another, as described in Configuring WebLogic JMS Clustering.
Redirects failed or expired messages to error destinations, as described in "Managing Rolled Back, Recovered, Redelivered, or Expired Messages" in Programming JMS for Oracle WebLogic Server.
Supports the JMS Delivery Count message property
JMSXDeliveryCount, which specifies the number of message delivery attempts, where the first attempt is 1, the second is 2, and so on. WebLogic Server makes a best effort to persist the delivery count, so that the delivery count does not reset back to one after a server reboot. See "Message" in Programming JMS for Oracle WebLogic Server.
Provides three levels of load balancing: network-level, JMS connections, and distributed destinations.
WebLogic JMS includes the following enterprise-level features:
WebLogic Server fully supports the JMS 1.1 Specification (available at
http://java.sun.com/products/jms/docs.html), is fully compliant with the Java EE 5.0 specification, and provides numerous "WebLogic JMS Extensions" that go beyond the standard JMS APIs.
Provides robust message and destination management capabilities:
Administrators can manipulate most messages in a running JMS Server, using either the Administration Console or runtime APIs. See Managing JMS Messages.
Administrators can pause and resume message production, message insertion (in-flight messages), and message consumption operations on a given JMS destination, or on all the destinations hosted by a single JMS Server, using either the Administration Console or runtime APIs. See Controlling Message Operations on Destinations.
Message-Driven EJBs (MDBs) also supply message pause and resume functionality, and can even automatically temporarily pause during error conditions. See "Programming and Configuring MDBs: Details" in Programming Message-Driven Beans for Oracle WebLogic Server.
Modular deployment of JMS resources, which are defined by an XML so that you can migrate your application and the required JMS configuration from environment to environment without opening an enterprise application file, and without extensive manual JMS reconfiguration. See Overview of JMS Modules.
JMS message producers can group ordered messages into a single unit-of-order, which guarantees that all such messages are processed serially in the order in which they were created. See "Using Message Unit-of-Order" in Programming JMS for Oracle WebLogic Server.
To provide an even more restricted notion of a group than the Message Unit-of-Order feature, the Message Unit-of-Work (UOW) feature allows JMS producers to identify certain messages as components of a UOW message group, and allows a JMS consumer to process them as such. For example, a JMS producer can designate a set of messages that need to be delivered to a single client without interruption, so that the messages can be processed as a unit. See "Using Unit-of-Work Message Groups" in Programming JMS for Oracle WebLogic Server.
Message Life Cycle Logging provides an administrator with better transparency about the existence of JMS messages from the JMS server viewpoint, in particular basic life cycle events, such as message production, consumption, and removal. See Message Life Cycle Logging.
Timer services available for scheduled message delivery, as described in "Setting Message Delivery Times" in Programming JMS for Oracle WebLogic Server.
Flexible expired message policies to handle expired messages, as described in "Handling Expired Messages" in Performance and Tuning for Oracle WebLogic Server.
Supports messages containing XML (Extensible Markup Language). See "Defining XML Message Selectors Using the XML Selector Method" in Programming JMS for Oracle WebLogic Server.
The WebLogic Thin T3 Client jar (
wlthint3client.jar) is a light-weight, performant alternative to the
wlclient.jar (IIOP) remote client jars. The Thin T3 client has a minimal footprint while providing access to a rich set of APIs that are appropriate for client usage. See "Developing a WebLogic Thin T3 Client" in Programming Stand-alone Clients for Oracle WebLogic Server.
The JMS SAF Client enables standalone JMS clients to reliably send messages to server-side JMS destinations, even when the JMS client cannot temporarily reach a destination (for example, due to a network connection failure). While disconnected from the server, messages sent by the JMS SAF client are stored locally on the client and are forwarded to server-side JMS destinations when the client reconnects. See "Reliably Sending Messages Using the JMS SAF Client" in Programming Stand-alone Clients for Oracle WebLogic Server.
Automatic pooling of JMS client resources in server-side applications via JMS resource-reference pooling. Server-side applications use standard JMS APIs, but get automatic resource pooling. See "Enhanced Java EE Support for Using WebLogic JMS With EJBs and Servlets" in Programming JMS for Oracle WebLogic Server.
WebLogic JMS features enterprise-class performance features, such as automatic message paging, message compression, and DOM support for XML messages:
WebLogic Server uses highly optimized disk access algorithms and other internal enhancements to provide a unified messaging kernel that improves both JMS-based and Web Services messaging performance. See "Using the WebLogic Persistent Store" in Configuring Server Environments for Oracle WebLogic Server.
You may greatly improve the performance of typical non-persistent messaging with One-Way Message Sends. When configured on a connection factory, associated producers can send messages without internally waiting for a response from the target destination's host JMS server. You can choose to allow queue senders and topic publishers to do one-way sends, or to limit this capability to topic publishers only. You can also specify a "One-Way Window Size" to determine when a two-way message is required to regulate the producer before it can continue making additional one-way sends. See "Configure connection factory flow control" in the Oracle WebLogic Server Administration Console Help.
Message paging automatically begins during peak load periods to free up virtual memory. See "Paging Out Messages To Free Up Memory" in Performance and Tuning for Oracle WebLogic Server.
Administrators can enable the compression of messages that exceed a specified threshold size to improve the performance of sending messages travelling across JVM boundaries using either the Administration Console or runtime APIs. See "Compressing Messages" in Performance and Tuning for Oracle WebLogic Server.
Synchronous consumers can also use the same efficient behavior as asynchronous consumers by enabling the Prefetch Mode for Synchronous Consumers option on the consumer's JMS connection factory, using either the Administration Console or runtime APIs. See "Using the Prefetch Mode to Create a Synchronous Message Pipeline" in Programming JMS for Oracle WebLogic Server.
Supplies a wide variety of performance tuning options for JMS messages. See "Tuning WebLogic JMS" in Performance and Tuning for Oracle WebLogic Server.
Supports MDB transaction batching by processing multiple messages in a single transaction. See "Using Batching with Message-Driven Beans" in Programming Message-Driven Beans for Oracle WebLogic Server.
JMS SAF provides better performance than the WebLogic Messaging Bridge across clusters. See "Tuning WebLogic JMS Store-and-Forward" in Performance and Tuning for Oracle WebLogic Server.
DOM (Document Object Model) support for sending XML messages greatly improves performance for implementations that already use a DOM, since those applications do not have to flatten the DOM before sending XML messages. See "Sending XML Messages" in Programming JMS for Oracle WebLogic Server.
Message flow control during peak load periods, including blocking overactive senders, as described in "Controlling the Flow of Messages on JMS Servers and Destinations" and "Defining Quota" in Performance and Tuning for Oracle WebLogic Server.
The automatic pooling of connections and other objects by the JMS wrappers via JMS resource-reference pooling. See "Enhanced Java EE Support for Using WebLogic JMS With EJBs and Servlets" in Programming JMS for Oracle WebLogic Server.
Multicasting of messages for simultaneous delivery to many clients using IP multicast, as described in "Using Multicasting with WebLogic JMS" in Programming JMS for Oracle WebLogic Server.
WebLogic JMS includes the following features to enable tight integration with WebLogic Server:
JMS can be accessed locally by server-side applications without a network call because the destinations can exist on the same server as the application.
Uses same ports, protocols, and user identities as WebLogic Server (T3, IIOP, and HTTP tunnelling protocols, optionally with SSL).
Web Services, Enterprise Java Beans (including MDBs), and servlets supplied by WebLogic Server can work in close concert with JMS.
Can be configured and monitored by using the same Administration Console, or by using the JMS API.
Supports the WebLogic Scripting Tool (WLST) to initiate, manage, and persist configuration changes interactively or by using an executable script. See Chapter 6, "Using WLST to Manage JMS Servers and JMS System Module Resources."
Complete JMX administrative and monitoring APIs, as described in Developing Custom Management Utilities With JMX for Oracle WebLogic Server.
Fully-integrated Transaction Manager, as described in "Introducing Transactions" in Programming JTA for Oracle WebLogic Server.
Leverages sophisticated security model built into WebLogic Server (policy engine), as described in "Understanding WebLogic Security" and "Resource Types You Can Secure with Policies" in Securing Resources Using Roles and Policies for Oracle WebLogic Server.
WebLogic JMS includes the following features for interoperability with other messaging services:
Fully supports direct interoperability with prior WebLogic Server releases as described in "WebLogic Server Compatibility" in Information Roadmap for Oracle WebLogic Server .
Messages forwarded transactionally by the WebLogic Messaging Bridge to other JMS providers — as well as to other instances and versions of WebLogic JMS, as described in Configuring and Managing the Messaging Bridge for Oracle WebLogic Server.
Supports mapping of other JMS providers so their objects appear in the WebLogic JNDI tree as local JMS objects. Also references remote instances of WebLogic Server in another cluster or domain in the local JNDI tree. See Foreign Server Configuration.
Uses MDBs to transactionally receive messages from multiple JMS providers. See "Programming and Configuring MDBs: Details" in Programming Message-Driven Beans for Oracle WebLogic Server.
Reliable Web Services integration with JMS as a transport, as described in "Using Web Services Reliable Messaging" in Programming Advanced Features of JAX-RPC Web Services for Oracle WebLogic Server.
Automatic transaction enlistment of non-WebLogic JMS client resources in server-side applications via JMS resource-reference pooling. See "Enhanced Java EE Support for Using WebLogic JMS With EJBs and Servlets" in Programming JMS for Oracle WebLogic Server.
Integration with Oracle Tuxedo messaging provided by WebLogic Tuxedo Connector. See "How to Configure the Oracle Tuxedo Queuing Bridge" in the WebLogic Tuxedo Connector Administration Guide for Oracle WebLogic Server.
The WebLogic JMS C API enables programs written in 'C' to participate in JMS applications. This implementation of the JMS C API uses JNI in order to access a Java Virtual Machine (JVM). See "WebLogic JMS C API" in Programming JMS for Oracle WebLogic Server.
Oracle Streams Advanced Queuing provides database-integrated message queuing functionality that leverages the functions of the Oracle database to manage messages. See Oracle Streams Advanced Queuing User's Guide.