Re: Re: message-driven beans from a topic

2001-02-03 Thread John Hogan

If the observable (sender) has knowledge of who the 
observers/listeners are, you can use the MessageDrivenBean as a 
notification service.  The observable delegates notification to the 
MessageDrivenBean, and includes recipients as part of the message.  
There will be just one instance of the MessageDrivenBean.

_

Get your free E-mail at http://www.ireland.com




RE: message-driven beans from a topic

2001-02-02 Thread Russ White



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 
  PMTo: Orion-InterestSubject: 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.)
  


Re: message-driven beans from a topic

2001-02-02 Thread Lauren Commons

What is the problem with message queues?  I've used
them succesfully
--- [EMAIL PROTECTED] wrote:
 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.)
  
 

 ATTACHMENT part 2 application/octet-stream
name=Router.java


 ATTACHMENT part 3 application/octet-stream
name=MessageBase.java



__
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/




RE: message-driven beans from a topic

2001-02-02 Thread Joseph B. Ottinger

How do you make it "kill itself?"

On Fri, 2 Feb 2001, Russ White wrote:

 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.)
 
 

---
Joseph B. Ottinger   [EMAIL PROTECTED]
http://epesh.com/ IT Consultant