Foreword | p. xi |
Preface | p. xiii |
Messaging Basics | p. 1 |
The Advantages of Messaging | p. 3 |
Heterogeneous Integration | p. 3 |
Reduce System Bottlenecks | p. 3 |
Increase Scalability | p. 4 |
Increase End User Productivity | p. 4 |
Architecture Flexibility and Agility | p. 5 |
Enterprise Messaging | p. 5 |
Centralized Architectures | p. 7 |
Decentralized Architectures | p. 7 |
Hybrid Architectures | p. 8 |
Centralized Architecture As a Model | p. 8 |
Messaging Models | p. 9 |
Point-to-Point | p. 10 |
Publish-and-Subscribe | p. 10 |
JMS API | p. 11 |
Point-to-Point API | p. 13 |
Publish-and-Subscribe API | p. 14 |
Real-World Scenarios | p. 14 |
Service-Oriented Architecture | p. 15 |
Event-Driven Architecture | p. 16 |
Heterogeneous Platform Integration | p. 16 |
Enterprise Application Integration | p. 17 |
Business-to-Business | p. 17 |
Geographic Dispersion | p. 18 |
Information Broadcasting | p. 18 |
Building Dynamic Systems | p. 18 |
RPC Versus Asynchronous Messaging | p. 21 |
Tightly Coupled RPC | p. 21 |
Enterprise Messaging | p. 23 |
Developing a Simple Example | p. 25 |
The Chat Application | p. 25 |
Getting Started with the Chat Example | p. 28 |
Examining the Source Code | p. 30 |
Sessions and Threading | p. 39 |
Anatomy of a JMS Message | p. 41 |
Headers | p. 42 |
Automatically Assigned Headers | p. 43 |
Developer-Assigned Headers | p. 46 |
Properties | p. 47 |
Application-Specific Properties | p. 47 |
JMS-Defined Properties | p. 49 |
Provider-Specific Properties | p. 50 |
Message Types | p. 50 |
Message | p. 50 |
TextMessage | p. 51 |
ObjectMessage | p. 52 |
BytesMessage | p. 53 |
StreamMessage | p. 56 |
MapMessage | p. 58 |
Read-Only Messages | p. 60 |
Client-Acknowledged Messages | p. 61 |
Interoperability and Portability of Messages | p. 61 |
Point-to-Point Messaging | p. 63 |
Point-to-Point Overview | p. 63 |
When to Use Point-to-Point Messaging | p. 66 |
The QBorrower and QLender Application | p. 67 |
Configuring and Running the Application | p. 67 |
The QBorrower Class | p. 69 |
The QLender Class | p. 76 |
Message Correlation | p. 81 |
Dynamic Versus Administered Queues | p. 83 |
Load Balancing Using Multiple Receivers | p. 84 |
Examining a Queue | p. 85 |
Publish-and-Subscribe Messaging | p. 87 |
Publish-and-Subscribe Overview | p. 87 |
When to Use Publish-and-Subscribe Messaging | p. 89 |
The TBorrower and TLender Application | p. 90 |
Configuring and Running the Application | p. 90 |
The TLender Class | p. 92 |
The TBorrower Class | p. 96 |
Durable Versus Nondurable Subscribers | p. 100 |
Dynamic Versus Administered Subscribers | p. 101 |
Unsubscribing Dynamic Durable Subscribers | p. 104 |
Temporary Topics | p. 104 |
Message Filtering | p. 107 |
Message Selectors | p. 109 |
Identifiers | p. 110 |
Literals | p. 111 |
Comparison Operators | p. 111 |
Arithmetic Operators | p. 113 |
Declaring a Message Selector | p. 114 |
Message Selector Examples | p. 116 |
Managing Claims in an HMO | p. 116 |
Notification of Certain Bids on Inventory | p. 116 |
Priority Handling | p. 116 |
Stock Trade Order Auditing | p. 117 |
Not Delivered Semantics | p. 117 |
Design Considerations | p. 118 |
Guaranteed Messaging and Transactions | p. 125 |
Guaranteed Messaging | p. 125 |
Message Autonomy | p. 126 |
Store-and-Forward Messaging | p. 126 |
Message Acknowledgments and Failure Conditions | p. 126 |
Message Acknowledgments | p. 127 |
AUTO_ACKNOWLEDGE | p. 127 |
DUPS_OK_ACKNOWLEDGE | p. 132 |
CLIENT_ACKNOWLEDGE | p. 132 |
Message Groups and Acknowledgment | p. 133 |
Handling Redelivery of Messages in an Application | p. 134 |
Message Groups Example | p. 134 |
Message Grouping and Multiple Receivers | p. 143 |
Transacted Messages | p. 145 |
Creating and Using a JMS Transaction | p. 147 |
Transacted Session Example | p. 147 |
Distributed Transactions | p. 150 |
Lost Connections | p. 151 |
The ExceptionListener Example | p. 152 |
Dead Message Queues | p. 153 |
Java EE and Message-Driven Beans | p. 155 |
Java EE Overview | p. 155 |
Enterprise JavaBeans | p. 156 |
Enterprise JavaBeans 3.0 (EJB3) Overview | p. 157 |
Simplified Bean Development | p. 158 |
Dependency Injection | p. 158 |
Simplified Callback Methods | p. 159 |
Programmatic Defaults | p. 159 |
Interceptors | p. 160 |
Java Persistence API | p. 162 |
JMS Resources in Java EE | p. 162 |
The JNDI Environment Naming Context (ENC) | p. 164 |
Message-Driven Beans | p. 166 |
Concurrent Processing and Scalability | p. 168 |
Defining Message-Driven Beans | p. 168 |
Message-Driven Bean Use Cases | p. 171 |
Message Facade | p. 171 |
Transformation and Routing | p. 173 |
Spring and JMS | p. 177 |
Spring Messaging Architecture | p. 177 |
JmsTemplate Overview | p. 180 |
Send Methods | p. 181 |
convertAndSend Methods | p. 181 |
receive and receiveSelected Methods | p. 182 |
receiveAndConvert Methods | p. 183 |
Connection Factories and JMS Destinations | p. 184 |
Using JNDI | p. 184 |
Using Native Classes | p. 187 |
Sending Messages | p. 189 |
Using the send Method | p. 190 |
Using the convertAndSend Method | p. 191 |
Using a Nondefault JMS Destination | p. 193 |
Receiving Messages Synchronously | p. 195 |
Message-Driven POJOs | p. 198 |
The Spring Message Listener Container | p. 198 |
MDP Option 1: Using the MessageListener Interface | p. 199 |
MDP Option 2: Using the SessionAwareMessageListener Interface | p. 201 |
MDP Option 3: Using the MessageListenerAdapter | p. 202 |
Message Conversion Limitations | p. 207 |
The Spring JMS Namespace | p. 208 |
Element Properties | p. 209 |
Element Properties | p. 211 |
Deployment Considerations | p. 213 |
Performance, Scalability, and Reliability | p. 213 |
Determining Message Throughput Requirements | p. 213 |
Testing the Real-World Scenario | p. 214 |
To Multicast or Not to Multicast | p. 217 |
TCP/IP | p. 218 |
UDP | p. 218 |
IP Multicast | p. 218 |
Messaging Over IP Multicast | p. 219 |
The Bottom Line | p. 221 |
Security | p. 222 |
Authentication | p. 222 |
Authorization | p. 223 |
Secure Communication | p. 224 |
Firewalls and HTTP Tunneling | p. 224 |
Connecting to the Outside World | p. 225 |
Bridging to Other Messaging Systems | p. 227 |
Messaging Design Considerations | p. 229 |
Internal Versus External Destination | p. 229 |
Internal Destination Topology | p. 230 |
External Destination Topology | p. 231 |
Request/Reply Messaging Design | p. 232 |
Messaging Design Anti-Patterns | p. 236 |
Single-Purpose Queue | p. 236 |
Message Priority Overuse | p. 240 |
Message Header Misuse | p. 240 |
The Java Message Service API | p. 245 |
Message Headers | p. 265 |
Message Properties | p. 277 |
Installing and Configuring ActiveMQ | p. 285 |
Index | p. 291 |
Table of Contents provided by Ingram. All Rights Reserved. |