You are previewing Java™ Message Service API Tutorial and Reference: Messaging for the J2EE™ Platform.
O'Reilly logo
Java™ Message Service API Tutorial and Reference: Messaging for the J2EE™ Platform

Book Description

Java™ Message Service API Tutorial and Reference provides a clear and complete introduction to the Java™ Message Service (JMS) API. This book illustrates how to use the JMS API to build applications that create, send, receive, and read messages. Beginning with comprehensive descriptions of fundamental JMS concepts and building blocks, the coverage extends to all aspects of running and creating JMS applications. Each topic area is supported by relevant and well-crafted JMS program examples that demonstrate how to put the technology to work.

The JMS API is an integral part of the Java 2 Platform, Enterprise Edition (J2EE™ platform). Developed by Sun Microsystems in close cooperation with enterprise messaging partners, JMS works together with other technologies to provide reliable, asynchronous communication between components in a distributed computing environment. It delivers a new, powerful tool for enterprise messaging--the cornerstone of today's enterprise applications.

You will find in-depth coverage on how to:

  • Create and run JMS client programs

  • Use the JMS API within the J2EE platform

  • Consume messages asynchronously with a message-driven bean

  • Produce messages from an application client and from a session bean

  • Access an entity bean from a message-driven bean

  • Create applications for the J2EE platform that use the JMS API to

  • Consume messages Produce messages Access an entity bean

From BytesMessage to TransactionRolledBackException, a useful alphabetical reference provides complete information on all facets of the JMS API.

Additionally, the tutorial example programs are downloadable from the Sun Web site, so that you can adapt them to implementations of the JMS API and the J2EE platform.

Written by an expert team, the book offers an unparalleled technical understanding of JMS and its integration into the J2EE platform. Its thorough and practical coverage of JMS makes it easy for developers working in a distributed Java technology environment, and those familiar with the J2EE platform, to efficiently integrate the JMS API.



0201784726B02212002

Table of Contents

  1. Copyright
  2. Preface
  3. Acknowledgments
  4. About the Authors
  5. Part One
    1. Overview
      1. What Is Messaging?
      2. What Is the JMS API?
      3. When Can You Use the JMS API?
      4. How Does the JMS API Work with the J2EE Platform?
    2. Basic JMS API Concepts
      1. JMS API Architecture
      2. Messaging Domains
      3. Message Consumption
    3. The JMS API Programming Model
      1. Administered Objects
      2. Connections
      3. Sessions
      4. Message Producers
      5. Message Consumers
      6. Messages
      7. Exception Handling
    4. Writing Simple JMS Client Applications
      1. Setting Your Environment for Running Applications
      2. A Simple Point-to-Point Example
      3. A Simple Publish/Subscribe Example
      4. Running JMS Client Programs on Multiple Systems
    5. Creating Robust JMS Applications
      1. Using Basic Reliability Mechanisms
      2. Using Advanced Reliability Mechanisms
    6. Using the JMS API in a J2EE Application
      1. Using Enterprise Beans to Produce and to Synchronously Receive Messages
      2. Using Message-Driven Beans
      3. Managing Distributed Transactions
      4. Using the JMS API with Application Clients and Web Components
    7. A Simple J2EE Application that Uses the JMS API
      1. Writing and Compiling the Application Components
      2. Creating and Packaging the Application
      3. Deploying and Running the Application
    8. A J2EE Application that Uses the JMS API with a Session Bean
      1. Writing and Compiling the Application Components
      2. Creating and Packaging the Application
      3. Deploying and Running the Application
    9. A J2EE Application that Uses the JMS API with an Entity Bean
      1. Overview of the Human Resources Application
      2. Writing and Compiling the Application Components
      3. Creating and Packaging the Application
      4. Deploying and Running the Application
    10. An Application Example that Uses Two J2EE Servers
      1. Overview of the Applications
      2. Writing and Compiling the Application Components
      3. Creating and Packaging the Application
      4. Deploying and Running the Applications
      5. Accessing a J2EE Application from a Remote System that Is Not Running a J2EE Server
  6. Part Two
    1. BytesMessage
      1. Overview and Related Methods and Interfaces
      2. Interface Definition
      3. Methods
    2. Connection
      1. Overview and Related Interfaces
      2. Interface Definition
      3. Methods
    3. ConnectionFactory
      1. Overview and Related Interfaces
      2. Interface Definition
    4. ConnectionMetaData
      1. Overview
      2. Interface Definition
      3. Methods
    5. DeliveryMode
      1. Overview
      2. Interface Definition
      3. Fields
    6. Destination
      1. Overview and Related Interfaces
      2. Interface Definition
    7. ExceptionListener
      1. Overview and Related Method
      2. Interface Definition
      3. Methods
    8. IllegalStateException
      1. Overview
      2. Class Definition
      3. Constructors
    9. InvalidClientIDException
      1. Overview
      2. Class Definition
      3. Constructors
    10. InvalidDestinationException
      1. Overview
      2. Class Definition
      3. Constructors
    11. InvalidSelectorException
      1. Overview
      2. Class Definition
      3. Constructors
    12. JMSException
      1. Overview
      2. Class Definition
      3. Constructors
      4. Methods
    13. JMSSecurityException
      1. Overview
      2. Class Definition
      3. Constructors
    14. MapMessage
      1. Overview and Related Methods and Interfaces
      2. Interface Definition
      3. Methods
    15. Message
      1. Overview
      2. Interface Definition
      3. Fields
      4. Methods
    16. MessageConsumer
      1. Overview and Related Interfaces
      2. Interface Definition
      3. Methods
    17. MessageEOFException
      1. Overview
      2. Class Definition
      3. Constructors
    18. MessageFormatException
      1. Overview
      2. Class Definition
      3. Constructors
    19. MessageListener
      1. Overview
      2. Interface Definition
      3. Methods
    20. MessageNotReadableException
      1. Overview
      2. Class Definition
      3. Constructors
    21. MessageNotWriteableException
      1. Overview
      2. Class Definition
      3. Constructors
    22. MessageProducer
      1. Overview and Related Interfaces
      2. Interface Definition
      3. Methods
    23. ObjectMessage
      1. Overview and Related Methods and Interfaces
      2. Interface Definition
      3. Methods
    24. Queue
      1. Overview and Related Methods and Interfaces
      2. Interface Definition
      3. Methods
    25. QueueBrowser
      1. Overview and Related Methods and Interfaces
      2. Interface Definition
      3. Methods
    26. QueueConnection
      1. Overview and Related Interfaces
      2. Interface Definition
      3. Methods
    27. QueueConnectionFactory
      1. Overview and Related Interfaces
      2. Interface Definition
      3. Methods
    28. QueueReceiver
      1. Overview and Related Methods and Interfaces
      2. Interface Definition
      3. Methods
    29. QueueRequestor
      1. Overview and Related Interfaces
      2. Class Definition
      3. Constructor
      4. Methods
    30. QueueSender
      1. Overview and Related Methods and Interfaces
      2. Interface Definition
      3. Methods
    31. QueueSession
      1. Overview and Related Methods and Interfaces
      2. Interface Definition
      3. Methods
    32. ResourceAllocationException
      1. Overview
      2. Class Definition
      3. Constructors
    33. Session
      1. Overview and Related Interfaces
      2. Interface Definition
      3. Fields
      4. Methods
    34. StreamMessage
      1. Overview and Related Methods and Interfaces
      2. Interface Definition
      3. Methods
    35. TemporaryQueue
      1. Overview and Related Methods and Interfaces
      2. Interface Definition
      3. Methods
    36. TemporaryTopic
      1. Overview and Related Methods and Interfaces
      2. Interface Definition
      3. Methods
    37. TextMessage
      1. Overview and Related Methods and Interfaces
      2. Interface Definition
      3. Methods
    38. Topic
      1. Overview and Related Methods and Interfaces
      2. Interface Definition
      3. Methods
    39. TopicConnection
      1. Overview and Related Interfaces
      2. Interface Definition
      3. Methods
    40. TopicConnectionFactory
      1. Overview and Related Interfaces
      2. Interface Definition
      3. Methods
    41. TopicPublisher
      1. Overview and Related Method
      2. Interface Definition
      3. Methods
    42. TopicRequestor
      1. Overview and Related Interface
      2. Class Definition
      3. Constructor
      4. Methods
    43. TopicSession
      1. Overview and Related Methods and Interfaces
      2. Interface Definition
      3. Methods
    44. TopicSubscriber
      1. Overview and Related Methods and Interfaces
      2. Interface Definition
      3. Methods
    45. TransactionInProgressException
      1. Overview
      2. Class Definition
      3. Constructors
    46. TransactionRolledBackException
      1. Overview
      2. Class Definition
      3. Constructors
    47. JMS Client Examples
      1. Durable Subscriptions
      2. Transactions
      3. Acknowledgment Modes
      4. Utility Class
    48. Glossary
  7. Index