This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes OO, Patterns, UML and Refactoring and the fly likes Observer pattern + JMS Pub-Sub Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Observer pattern + JMS Pub-Sub" Watch "Observer pattern + JMS Pub-Sub" New topic
Author

Observer pattern + JMS Pub-Sub

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1371
Pub-Sub implements Observer pattern.Per my understanding Publisher is Subject and Subscribers are Observers. So publishers state change will be notified to Observers whenever there is a state change.

Do I need to implement any interface method for sending the message in the Subject (TopicPublisher) ?

Which is the right approach to implement the Observer (TopicSubscriber)?
Observer Class implements MessageListener's onMessage(message) (or) Observer Class implements NotificationListener's handleNotification(notification, callback)/
 
jQuery in Action, 2nd edition
 
subject: Observer pattern + JMS Pub-Sub
 
Similar Threads
Object referenced multiple collections
MVC modify model from outside of the table.
Observer Example
How to implement message selector ???
Mediator vs Observer what is the difference?