Introduction to WebLogic JMS
Overview of WebLogic JMS?
What Is the Java Message Service?
Implementation of Java Specifications
J2EE Specification
JMS Specification
WebLogic JMS Features
Enterprise-Grade Reliability
Enterprise-Level Features
Tight Integration With WebLogic Server
Interoperability with Other Messaging Services
WebLogic JMS Architecture
Major Components
Clustering Features
WebLogic JMS Public API Extensions
JMS Enhancements in WebLogic Server 8.1
JMS Thin Client
Simplified Access to Remote or Third-Party JMS Providers
Easier Access to JMS Through EJBs and Servlets
Better Expired Message Handling
Improved Message Flow Control by Blocking Producers
Ordered Redelivery of Messages
Dynamically Deleting Queue or Topic Destinations
Using the Configuration Wizard to Configure JMS
JMS Deprecations in WebLogic Server 8.1
ServerSessionPoolFactory Class in the weblogic.jms Package
Boot Flags for Disabling Synchronous Writes on JMS File Stores
WebLogic JMS Fundamentals
Messaging Models
Point-to-Point Messaging
Publish/Subscribe Messaging
Message Persistence
WebLogic JMS Classes
ConnectionFactory Object
Using the Default Connection Factories
Configuring and Deploying Connection Factories
The ConnectionFactory Class
Connection Object
Session Object
Non-Transacted Session
Transacted Session
Destination Object
Distributed Destinations
MessageProducer and MessageConsumer Objects
Message Object
Message Header Fields
Message Property Fields
Message Body
ServerSessionPoolFactory Object
ServerSessionPool Object
ServerSession Object
ConnectionConsumer Object
Managing WebLogic JMS
Configuring WebLogic JMS
Modifying Default Values for Configuration Attributes
Starting WebLogic Server and Configuring JMS
Starting the Default WebLogic Server
Starting the Administration Console
Manually Configuring a Basic JMS Implementation
Using the Configuration Wizard to Configure JMS
Configuring WebLogic JMS Clustering
Obtain a Clustered JMS Licence
How JMS Clustering Works
JMS Clustering Naming Requirements
JMS Distributed Destination within a Cluster
JMS as a Migratable Service within a Cluster
Configuration Steps
What About Failover?
Configuring JMS Migratable Targets
How JMS Migration Works
Configuration Steps for JMS Migration
Persistent Store Migration
Migration Failover
Tuning WebLogic JMS
Monitoring WebLogic JMS
Recovering from a WebLogic Server Failure
Programming Considerations
Migrating JMS Data to a New Server
Developing a WebLogic JMS Application
Application Development Flow
Importing Required Packages
Setting Up a JMS Application
Step 1: Look Up a Connection Factory in JNDI
Step 2: Create a Connection Using the Connection Factory
Create a Queue Connection
Create a Topic Connection
Step 3: Create a Session Using the Connection
Create a Queue Session
Create a Topic Session
Step 4: Look Up a Destination (Queue or Topic)
Server Affinity When Looking Up Destinations
Step 5: Create Message Producers and Message Consumers Using the Session and Destinations
Create QueueSenders and QueueReceivers
Create TopicPublishers and TopicSubscribers
Step 6a: Create the Message Object (Message Producers)
Step 6b: Optionally Register an Asynchronous Message Listener (Message Consumers)
Step 7: Start the Connection
Example: Setting Up a PTP Application
Example: Setting Up a Pub/Sub Application
Sending Messages
Step 1: Create a Message Object
Step 2: Define a Message
Step 3: Send the Message to a Destination
Send a Message Using Queue Sender
Send a Message Using TopicPublisher
Setting Message Producer Attributes
Example: Sending Messages Within a PTP Application
Example: Sending Messages Within a Pub/Sub Application
Receiving Messages
Receiving Messages Asynchronously
Asynchronous Message Pipeline
Receiving Messages Synchronously
Example: Receiving Messages Synchronously Within a PTP Application
Example: Receiving Messages Synchronously Within a Pub/Sub Application
Recovering Received Messages
Acknowledging Received Messages
Releasing Object Resources
Managing Rolled Back, Recovered, Redelivered, or Expired Messages
Setting a Redelivery Delay for Messages
Setting a Redelivery Delay
Overriding the Redelivery Delay on a Destination
Setting a Redelivery Limit for Messages
Configuring a Message Redelivery Limit On a Destination
Configuring an Error Destination for Undelivered Messages
Ordered Redelivery of Messages
Required Message Pipeline Setting for the Messaging Bridge and MDBs
Performance Limitations
Handling Expired Messages
Setting Message Delivery Times
Setting a Delivery Time on Producers
Setting a Delivery Time on Messages
Overriding a Delivery Time
Interaction With the Time-to-Live Value
Setting a Relative Time-to-Deliver Override
Setting a Scheduled Time-to-Deliver Override
JMS Schedule Interface
Managing Connections
Defining a Connection Exception Listener
Accessing Connection Metadata
Starting, Stopping, and Closing a Connection
Managing Sessions
Defining a Session Exception Listener
Closing a Session
Creating Destinations Dynamically
Using the JMSHelper Class Methods
Deleting Destinations Dynamically
Preconditions for Deleting Destinations
Using the JMSHelper Class Methods
Message Timestamps for Troubleshooting Deleted Destinations
Deleted Destination Statistics
Using Temporary Destinations
Creating a Temporary Queue
Creating a Temporary Topic
Deleting a Temporary Destination
Setting Up Durable Subscriptions
Defining the Persistent Store
Defining the Client ID
Creating Subscribers for a Durable Subscription
Deleting Durable Subscriptions
Modifying Durable Subscriptions
Managing Durable Subscriptions
Setting and Browsing Message Header and Property Fields
Setting Message Header Fields
Setting Message Property Fields
Browsing Header and Property Fields
Filtering Messages
Defining Message Selectors Using SQL Statements
Defining XML Message Selectors Using XML Selector Method
Displaying Message Selectors
Indexing Topic Subscriber Message Selectors To Optimize Performance
Defining Server Session Pools
Step 1: Look Up Server Session Pool Factory in JNDI
Step 2: Create a Server Session Pool Using the Server Session Pool Factory
Create a Server Session Pool for Queue Connection Consumers
Create a Server Session Pool for Topic Connection Consumers
Step 3: Create a Connection Consumer
Create a Connection Consumer for Queues
Create a Connection Consumer for Topics
Example: Setting Up a PTP Client Server Session Pool
Example: Setting Up a Pub/Sub Client Server Session Pool
Using Multicasting
Step 1: Set Up the JMS Application, Creating Multicast Session and Topic Subscriber
Step 2: Set Up the Message Listener
Dynamically Configuring Multicasting Configuration Attributes
Example: Multicast TTL
Using Distributed Destinations
Accessing Distributed Destinations
Looking Up Distributed Queues
Looking Up Distributed Topics
Accessing Distributed Destination Members
Load Balancing Messages Across a Distributed Destination
Load Balancing Options
Consumer Load Balancing
Producer Load Balancing
Load Balancing Heuristics
Defeating Load Balancing
How Distributed Destination Load Balancing Is Affected When Using the "Server Affinity Enabled" Attribute
Distributed Destination Migration
Distributed Destination Failover
Using Transactions with WebLogic JMS
Overview of Transactions
Using JMS Transacted Sessions
Step 1: Set Up JMS Application, Creating Transacted Session
Step 2: Perform Desired Operations
Step 3: Commit or Roll Back the JMS Transacted Session
Using JTA User Transactions
Step 1: Set Up JMS Application, Creating Non-Transacted Session
Step 2: Look Up User Transaction in JNDI
Step 3: Start the JTA User Transaction
Step 4: Perform Desired Operations
Step 5: Commit or Roll Back the JTA User Transaction
Asynchronous Messaging Within JTA User Transactions Using Message Driven Beans
Example: JMS and EJB in a JTA User Transaction
Using JMS with EJBs and Servlets
Enabling Enhanced J2EE Support for WebLogic JMS
Declaring JMS Objects as Resources In the EJB or Servlet Deployment Descriptors
Declaring a Wrapped JMS Connection Factory
Declaring JMS Destinations
Sending a JMS Message In a J2EE Container
What's Happening Under the JMS Wrapper Covers
Automatically Enlisting Transactions
Container-Managed Security
Connection Testing
J2EE Compliance
Pooled JMS Connection Objects
Improving Performance Through Pooling
Speeding Up JNDI Lookups by Pooling Session Objects
Speeding Up Object Creation Through Caching
Enlisting the Proper Transaction Mode
Examples of JMS Wrapper Functions
ejb-jar.xml
weblogic-ejb-jar.xml
PoolTest.java
PoolTestHome.java
PoolTestBean.java
Simplified Access to Remote or Foreign JMS Providers
WebLogic JMS Thin Client
Overview of the JMS Thin Client
JMS Thin Client Functionality
Limitations of Using the JMS Thin Client
Deploying the JMS Thin Client
Porting WebLogic JMS Applications
Existing Feature Functionality Changes
Existing Feature 5.1 to 6.0 Functionality Changes
Existing Feature 6.0 to 6.1 Functionality Changes
Porting Existing Applications
Before You Begin
Steps for Porting Version 5.1 Applications to Version 8.1
Deleting JDBC Database Stores
Steps for Porting Version 6.0 Applications to Version 8.1
Steps for Porting Version 6.1 or 7.0 Applications to Version 8.1Configuration Checklists
Server Clusters
JTA User Transactions
JMS Transactions
Message Delivery
Asynchronous Message Delivery
Persistent Messages
Concurrent Message Processing
Multicasting
Durable Subscriptions
Destination Sort Order
Temporary Destinations
Thresholds and Quotas
JDBC Database Utility
Overview
About JMS Tables
Regenerating JDBC Database Stores