| Author |
pub/sub issues
|
Dm Laf
Greenhorn
Joined: Mar 23, 2004
Posts: 10
|
|
Is the subscriber using the message listener, when a message is published, to receive the message and remove it from the topic. Will the subscriber be able to receive another message from a publisher on the same topic. At the moment i have developed an mdb,publisher and subscriber and i receive only the first message without any listener whatsoever. However if i add the following line: subscriber.setMessageListener(this); i get the following exception: javax.jms.JMSException: A message listener is already registered. My class implements MessageListener and onMessage method. Any ideas?
|
 |
Lasse Koskela
author
Sheriff
Joined: Jan 23, 2002
Posts: 11962
|
|
|
When you try to register "this" as a MessageListener, which object is "this" pointing to?
|
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
|
 |
Pinda Ros
Ranch Hand
Joined: Apr 14, 2003
Posts: 65
|
|
"this" obviously point to the current object, which i guess it implements MessageListener and has a method onMessage... implemented etc etc view here for more info
|
NanoAgent is an Artificial intelligence RoBot of microscopic proportions built by means of nanotechnology
|
 |
 |
|
|
subject: pub/sub issues
|
|
|