Section 7.7. Core JMS API


7.7. Core JMS API

The JMS API resides in the javax.jms package. These are the most important classes and interfaces for our purposes:


Message

Holds business data and routing information. Although you'll find several types of Messages, most of the time you'll use either a TextMessage (that contains textual data in its body) or an ObjectMessage (that holds serializable objects in its body).


Destination

Holds messages sent by the Producer to be received by the Consumer(s). A Destination is either a Queue or a Topic that the JMS Server manages on behalf of its clients.


Connection

Enables a JMS client to send or receive Messages. Use a Connection to create one or more Sessions.


ConnectionFactory

A ConnectionFactory is either a QueueConnectionFactory or it is a TopicConnectionFactory, depending on the messaging model, and it exists to create Connections.


Session

A Session creates Producers, Consumers, and Messages. A Publish-Subscribe application uses a TopicSession, and a Point-to-Point application uses a QueueSession. Sessions are single-threaded.



JBoss at Work. A Practical Guide
JBoss at Work: A Practical Guide
ISBN: 0596007345
EAN: 2147483647
Year: 2004
Pages: 197

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net