This is a serious hack, but...
 
Make your bean kill itself when it responds to a message.
 
Sometimes all you have is the suicide solution. :)
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED]
Sent: Friday, February 02, 2001 1:12 PM
To: Orion-Interest
Subject: message-driven beans from a topic

I've got a message-driven bean listening to a topic. (Yes, I know, queues would be better, but the queue/message driven mechanism has a problem, last I checked.) However, every message causes a new instantiation of a message-driven bean... and since it's a topic, it's feeding the message to every listener, which means the second message going through the topic gets processed TWICE (once by each instantiated bean), the third gets processed three times, etc.
 
Is there a workaround? I normally dislike workarounds, but this is currently just for a dog and pony show coming up. The beans are simple; I've included one example (does nothing worthwhile.)
 

Reply via email to