Designing Messaging Solutions with JMS - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

Designing Messaging Solutions with JMS

Description:

Application Style Elements. Sending Messages. Persistent Messages. Guaranteed Delivery ... Order order = new Order(); order.setCustomerName('Eric Whipple' ... – PowerPoint PPT presentation

Number of Views:27
Avg rating:3.0/5.0
Slides: 16
Provided by: conference71
Category:

less

Transcript and Presenter's Notes

Title: Designing Messaging Solutions with JMS


1
Designing Messaging Solutions with JMS
  • Eric Whipple
  • AAA of Michigan

2
Agenda
  • Introduction
  • Choosing an Application Model
  • JMS Messages
  • JMS Application Style
  • JMS and XML
  • JMS and EJBs
  • Conclusion

3
Introduction
  • Message-Oriented Middleware
  • JMS Terminology
  • Client
  • Server
  • Destination
  • Producer/Consumer

4
JMS Application Models
  • Publish/Subscribe
  • Topics
  • Publisher
  • Subscriber
  • Point to Point
  • Queue
  • Sender
  • Receiver

5
JMS Messages
  • Properties
  • Headers
  • Body

6
JMS Message Types
  • TextMessage
  • BytesMessage
  • MapMessage
  • StreamMessage
  • ObjectMessage

7
Basic JMS Example
8
Application Style Elements
  • Sending Messages
  • Persistent Messages
  • Guaranteed Delivery
  • Transacted Sessions
  • Receiving Messages
  • Push/Pull Model
  • Durable Subscriptions
  • Message Selection

9
JMS and XML
  • Text and TextMessages
  • Using JMS Properties
  • Using Java Objects

10
XML and TextMessages
  • lt?xml version1.0" encoding"UTF-8"?gt
  • ltordergt
  • ltcustomernamegtEric Whipplelt/customernamegt
  • ltitemnumbergt34456lt/itemnumbergt
  • ltquantitygt10lt/quantitygt
  • lt/ordergt
  • TextMessage textMessage getTopicSession(false).c
    reateTextMessage(message)
  • getTopicPublisher().publish(textMessage)
  • if (isTransacted())
  • getTopicSession(false).commit()

11
XML and JMS Properties
  • lt?xml version1.0" encoding"UTF-8"?gt
  • ltordergt
  • ltcustomernamegtEric Whipplelt/customernamegt
  • ltitemnumbergt34456lt/itemnumbergt
  • ltquantitygt10lt/quantitygt
  • lt/ordergt
  • TextMessage textMessage getTopicSession(false).c
    reateTextMessage(message)
  • textMessage.setStringProperty("EVENT_TYPE",eventTy
    pe)
  • getTopicPublisher().publish(textMessage)
  • if (isTransacted())
  • getTopicSession(false).commit()

12
XML and Java Objects
  • Order order new Order()
  • order.setCustomerName(Eric Whipple)
  • order.setItemNumber(34456)
  • order.setQuantity(10)
  • ObjectMessage objMessage getTopicSession(false).
    createObjectMessage(order)
  • objMessage.setStringProperty("EVENT_TYPE",eventTyp
    e)
  • getTopicPublisher().publish(objMessage)
  • if (isTransacted())
  • getTopicSession(false).commit()

13
JMS in the Enterprise
  • JMS as an Enterprise Event Notification Service
  • JMS and EJBs

14
JMS in the Enterprise
15
Conclusion
  • JMS IS GOOD.
Write a Comment
User Comments (0)
About PowerShow.com