Java Message Service API Tutorial and Reference: Messaging for the J2EE Platform Be the First to Write a Review and tell the world about this title!People who purchase this book frequently purchase: Books on similar topics, in best-seller order:Books from the same publisher, in best-seller order:
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.
Table of Contents
Preface.
Acknowledgments.
I. OVERVIEW.
1. Overview.
What Is Messaging?
What Is the JMS API?
When Can You Use the JMS API?
How Does the JMS API Work with the J2EE™ Platform?
2. Basic JMS API Concepts.
JMS API Architecture.
Messaging Domains.
Point-to-Point Messaging Domain.
Publish/Subscribe Messaging Domain.
Message Consumption.
3. The JMS API Programming Model.
Administered Objects.
Connection Factories.
Destinations.
Connections.
Sessions.
Message Producers.
Message Consumers.
Message Listeners.
Message Selectors.
Messages.
Message Headers.
Message Properties.
Message Bodies.
Exception Handling.
4. Writing Simple JMS Client Applications.
Setting Your Environment for Running Applications.
A Simple Point-to-Point Example.
Writing the PTP Client Programs.
Compiling the PTP Clients.
Starting the JMS Provider.
Creating the JMS Administered Objects.
Running the PTP Clients.
Deleting the Queue.
A Simple Publish/Subscribe Example.
Writing the Pub/Sub Client Programs.
Compiling the Pub/Sub Clients.
Starting the JMS Provider.
Creating the JMS Administered Objects.
Running the Pub/Sub Clients.
Deleting the Topic and Stopping the Server.
Running JMS Client Programs on Multiple Systems.
Communicating Between Two J2EE Servers.
Communicating Between a J2EE Server and a System Not Running a J2EE Server.
5. Creating Robust JMS Applications.
Using Basic Reliability Mechanisms.
Controlling Message Acknowledgment.
Specifying Message Persistence.
Setting Message Priority Levels.
Allowing Messages to Expire.
Creating Temporary Destinations.
Using Advanced Reliability Mechanisms.
Creating Durable Subscriptions.
Using JMS API Local Transactions.
6. Using the JMS API in a J2EE Application.
Using Enterprise Beans to Produce and Synchronously
Receive Messages.
Administered Objects.
Resource Management.
Transactions.
Using Message-Driven Beans.
Managing Distributed Transactions.
Using the JMS API with Application Clients and Web Components.
7. A Simple J2EE Application that Uses the JMS API.
Writing and Compiling the Application Components.
Coding the Application Client: SimpleClient.java.
Coding the Message-Driven Bean: MessageBean.java.
Compiling the Source Files.
Creating and Packaging the Application.
Starting the J2EE Server and Deploytool.
Creating a Queue.
Creating the J2EE Application.
Packaging the Application Client.
Packaging the Message-Driven Bean.
Checking the JNDI Names.
Deploying and Running the Application.
Looking at the Deployment Descriptor.
Adding the Server.
Deploying the Application.
Running the Client.
Undeploying the Application.
Removing the Application and Stopping the Server.
8. A J2EE Application that Uses the JMS API with a Session Bean.
Writing and Compiling the Application Components.
Coding the Application Client: MyAppClient.java.
Coding the Publisher Session Bean.
Coding the Message-Driven Bean: MessageBean.java.
Compiling the Source Files.
Creating and Packaging the Application.
Starting the J2EE Server and Deploytool.
Creating a Topic.
Creating a Connection Factory.
Creating the J2EE Application.
Packaging the Application Client.
Packaging the Session Bean.
Packaging the Message-Driven Bean.
Specifying the JNDI Names.
Deploying and Running the Application.
Adding the Server.
Deploying the Application.
Running the Client.
Undeploying the Application.
Removing the Application and Stopping the Server.
9. A J2EE Application that Uses the JMS API with an Entity Bean.
Overview of the Human Resources Application.
Writing and Compiling the Application Components.
Coding the Application Client: HumanResourceClient.java.
Coding the Message-Driven Beans.
Coding the Entity Bean.
Compiling the Source Files.
Creating and Packaging the Application.
Starting the J2EE Server and Deploytool.
Creating a Queue.
Starting the Cloudscape Database Server.
Creating the J2EE Application.
Packaging the Application Client.
Packaging the Equipment Message-Driven Bean.
Packaging the Office Message-Driven Bean.
Packaging the Schedule Message-Driven Bean.
Packaging the Entity Bean.
Specifying the Entity Bean Deployment Settings.
Specifying the JNDI Names.
Deploying and Running the Application.
Adding the Server.
Deploying the Application.
Running the Client.
Undeploying the Application.
Removing the Application and Stopping the Server.
10. An Application Example that Uses Two J2EE Servers.
Overview of the Applications.
Writing and Compiling the Application Components.
Coding the Application Client: MultiAppServerRequester.java.
Coding the Message-Driven Bean: ReplyMsgBean.java.
Compiling the Source Files.
Creating and Packaging the Application.
Starting the J2EE Servers and Deploytool.
Creating a Connection Factory.
Creating the First J2EE Application.
Packaging the Application Client.
Creating the Second J2EE Application.
Packaging the Message-Driven Bean.
Checking the JNDI Names.
Deploying and Running the Applications.
Adding the Server.
Deploying the Applications.
Running the Client.
Undeploying the Applications.
Removing the Applications and Stopping the Servers.
Accessing a J2EE Application from a Remote System That Is Not Running a J2EE
Server.
Accessing a J2EE Application from a Standalone
Client.
Using runclient to Access a Remote Application Client.
II. BYTESMESSAGE.
11. BytesMessage.
Overview and Related Methods and Interfaces.
Interface Definition.
Methods.
12. Connection.
Overview and Related Interfaces.
Interface Definition.
Methods.
13. ConnectionFactory.
Overview and Related Interfaces.
Interface Definition.
14. ConnectionMetaData.
Overview.
Interface Definition.
Methods.
15. DeliveryMode.
Overview.
Interface Definition.
Fields.
16. Destination.
Overview and Related Interfaces.
Interface Definition.
17. ExceptionListener.
Overview and Related Method.
Interface Definition.
Methods.
18. IllegalStateException.
Overview.
Class Definition.
Constructors.
19. InvalidClientIDException.
Overview.
Class Definition.
Constructors.
20. InvalidDestinationException.
Overview.
Class Definition.
Constructors.
21. InvalidSelectorException.
Overview.
Class Definition.
Constructors.
22. JMSException.
Overview.
Class Definition.
Constructors.
Methods.
23. JMSSecurityException.
Overview.
Class Definition.
Constructors.
24. MapMessage.
Overview and Related Methods and Interfaces.
Interface Definition.
Methods.
25. Message.
Overview.
Message Bodies.
Message Headers.
Message Properties.
Provider Implementations of JMS Message Interfaces.
Message Selectors.
Related Methods and Interfaces.
Interface Definition.
Fields.
Methods
26. MessageConsumer.
Overview and Related Interfaces.
Interface Definition.
Methods.
27. MessageEOFException.
Overview.
Class Definition.
Constructors.
28. MessageFormatException.
Overview.
Class Definition.
Constructors.
29. MessageListener.
Overview.
Interface Definition.
Methods.
30. MessageNotReadableException.
Overview.
Class Definition.
Constructors.
31. MessageNotWriteableException.
Overview.
Class Definition.
Constructors.
32. MessageProducer.
Overview and Related and Interfaces.
Interface Definition.
Methods.
33. ObjectMessage.
Overview and Related Methods and Interfaces.
Interface Definition.
Methods.
34. Queue.
Overview and Related Methods and Interfaces.
Interface Definition.
Methods.
35. QueueBrowser.
Overview and Related Methods and Interfaces.
Interface Definition.
Methods.
36. QueueConnection.
Overview and Related Interfaces.
Interface Definition.
Methods.
37. QueueConnectionFactory.
Overview and Related Interfaces.
Interface Definition.
Methods.
38. QueueReceiver.
Overview and Related Interfaces.
Interface Definition.
Methods.
39. QueueRequestor.
Overview and Related Interfaces.
Class Definition.
Constructor.
Methods.
40. QueueSender.
Overview and Related Methods and Interfaces.
Interface Definition.
Methods.
41. QueueSession.
Overview and Related Methods and Interfaces.
Interface Definition.
Methods.
42. ResourceAllocationException.
Overview.
Class Definition.
Constructors.
43. Session.
Overview and Related Interfaces.
Interface Definition.
Fields.
Methods.
44. StreamMessage.
Overview and Related Methods and Interfaces.
Interface Definition.
Method.
45. TemporaryQueue.
Overview and Related Methods and Interfaces.
Interface Definition.
Methods.
46. TemporaryTopic.
Overview and Related Methods and Interfaces.
Interface Definition.
Methods. @CHAPTER 47. TextMessage.
Overview and Related Methods and Interfaces.
Interface Definition.
Methods.
48. Topic.
Overview and Related Methods and Interfaces.
Interface Definition.
Methods.
49. TopicConnection.
Overview and Related Interfaces.
Interface Definition.
Methods.
50. TopicConnectionFactory.
Overview and Related Interfaces.
Interface Definition.
Methods.
51. TopicPublisher.
Overview and Related Method.
Interface Definition.
Methods.
52. TopicRequestor.
Overview and Related Interface.
Class Definition.
Constructor.
Methods.
53. TopicSession.
Overview and Related Methods and Interfaces.
Interface Definition.
Methods.
54. TopicSubscriber.
Overview and Related Methods and Interfaces.
Interface Definition.
Methods.
55. TransactionInProgressException.
Overview.
Class Definition.
Constructors.
56. TransactionRolledBackException.
Overview.
Class Definition.
Constructors.
Appendix A: JMS Client Examples.
Durable Subscriptions.
Transactions.
Acknowledgment Modes.
Utility Class.
Glossary.
Index
|