Sun Java logo     Copyright      Index      Next     

Sun logo
Sun Java System Message Queue 3 2005Q1 Developer's Guide for Java Clients 


List of Figures

List of Tables

List of Code Examples

Who Should Use This Book
Before You Read This Book
How This Book Is Organized
Conventions Used in this Book
Text Conventions
Directory Variable Conventions
Related Documentation
The Message Queue Documentation Set
Example Client Applications
The Java Message Service (JMS) Specification
The SOAP with Attachments API for Java (SAAJ) Specification
Books on JMS Programming
Related Third-Party Web Site References
Sun Welcomes Your Comments

Chapter 1   Overview
Message Queue for the Java Developer
Message Queue Java Client Files
JMS Client Setup Operations
To Set Up a Client to Produce Messages
To Set Up a Client to Consume Messages
Quick-Start Tutorial
Setting Up Your Environment
Starting and Testing the Message Server
To Start a Broker
To Test a Broker
Developing a Simple Client Application
Compiling and Running a Client Application
To Compile and Run the HelloWorldMessage Application
Example Application Code
Client Application Deployment Considerations

Chapter 2   Using Administered Objects
JNDI Lookup of Administered Objects
Looking Up ConnectionFactory Objects
To Perform a JNDI Lookup of a ConnectionFactory Object
Looking Up Destination Objects
To Perform a JNDI Lookup of a Destination Object
Instantiating Administered Objects
Instantiating ConnectionFactory Objects
To Directly Instantiate and Configure a ConnectionFactory Object
Instantiating Destination Objects
To Directly Instantiate and Configure a Destination Object
Overriding Administered Object Settings

Chapter 3   Message Queue Clients: Design and Features
Client Design Considerations
Developing Portable Clients
Choosing Programming Domains
Connections and Sessions
Producers and Consumers
Assigning Client Identifiers
Message Order and Priority
Using Selectors Efficiently
Balancing Reliability and Performance
Managing Client Threads
JMS Threading Restrictions
Thread Allocation for Connections
Managing Memory and Resources
Managing Memory
Managing Message Size
Message Compression
Advantages and Limitations of Compression
Compression Examples
Managing the Dead Message Queue
Managing Physical Destination Limits
Programming Issues for Message Consumers
Using the Client Runtime Ping Feature
Preventing Message Loss for Synchronous Consumers
Synchronous Consumption in Distributed Applications
Factors Affecting Performance
Delivery Mode (Persistent/Non-persistent)
Use of Transactions
Acknowledgement Mode
Durable vs. Non-Durable Subscriptions
Use of Selectors (Message Filtering)
Message Size
Message Body Type
Client Connection Failover (Auto-Reconnect)
Enabling Auto-Reconnect
Auto-Reconnect Behaviors
Auto-Reconnect Limitations
Auto-Reconnect Configuration Examples
Single-Broker Auto-Reconnect
Parallel Broker Auto-Reconnect
Clustered-Broker Auto-Reconnect
Custom Client Acknowledgment
Using Client Acknowledge Mode
Using No Acknowledge Mode
Communicating with C Clients

Chapter 4   Using the Metrics Monitoring API
Monitoring Overview
Administrative Tasks
Implementation Summary
Creating a Metrics-Monitoring Client
Format of Metrics Messages
Broker Metrics
JVM Metrics
Destination-List Metrics
Destination Metrics
Metrics Monitoring Client Code Examples
A Broker Metrics Example
A Destination List Metrics Example
A Destination Metrics Example

Chapter 5   Working with SOAP Messages
What is SOAP?
SOAP with Attachments API for Java
The Transport Layer
The SOAP Layer
The Language Implementation Layer
The Profiles Layer
The SOAP Message
SOAP Packaging Models
SOAP Messaging in JAVA
The SOAP Message Object
Inherited Methods
Destination, Message Factory, and Connection Objects
Message Factory
Using SOAP Administered Objects
SOAP Messaging Models and Examples
SOAP Messaging Programming Models
Point-to-Point Connections
Working with Attachments
To Create and Add an Attachment
Exception and Fault Handling
Writing a SOAP Client
Writing a SOAP Service
Disassembling Messages
Handling Attachments
Replying to Messages
Handling SOAP Faults
Integrating SOAP and Message Queue
Example 1: Deferring SOAP Processing
To Transform the SOAP Message into a JMS Message and Send the JMS Message
To Receive the JMS Message, Transform it into a SOAP Message, and Process It
Example 2: Publishing SOAP Messages
Code Samples

Appendix A   Warning Messages and Client Error Codes

Copyright      Index      Next     

Part No: 819-0068-10.   Copyright 2005 Sun Microsystems, Inc. All rights reserved.