Solved

MDB or simple client

Posted on 2002-07-19
10
196 Views
Last Modified: 2010-03-31
Hi all
I want to write little application using JMS technology.
I want to have more then one consumers to that topic but I don't want them to work on the same messages, means if I have two consumers, the first message arrive will be handled by the first consumer and the second message by the second consumer, should I use MDB for this porpuse ?
How can I perform it?
   Thanks
0
Comment
Question by:dannysh
  • 5
  • 5
10 Comments
 
LVL 2

Expert Comment

by:nir2002
Comment Utility
Hi Danny,

For helping you I need to have additional information:
1) does the sender know or can know who is the reciever?
2) Is a specfic reciever dedicated to specfic task, waiting to specfic message?
3) For what reasons you need more than one client?

note: when you write a message driven bean you can define how much listeners so when a message arrive the "first" instance handle it, if another message arrive before the "first" finish handle the message the "second" listener handle this arriving message otherwise either the "first" handle the message or other listener handle the second message.

Best regards
Nir
0
 

Author Comment

by:dannysh
Comment Utility
Hi Nir
Nice to hear from you agian.

for your questions:
1. The reciver doesn't care who send the message. Is it possible to know who is the sender?

2. I don't need specific reciever to a specific sender.

3. I need more then one client cause my clients perform long task, and I don't want to create a bottle neck at this point.

Is it possible do define how much listeners I want in MDB?

    Danny
0
 
LVL 2

Accepted Solution

by:
nir2002 earned 40 total points
Comment Utility
yes, it is server property.
please look at your application server documentation to see how to configure your server.
0
 

Author Comment

by:dannysh
Comment Utility
Nir thank you for your help.
   Danny Shaul
0
 
LVL 2

Expert Comment

by:nir2002
Comment Utility
I glad I could help you
best regards
Nir :-)

0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:dannysh
Comment Utility
BTW
Is it possible to define the topic to connect to not via XML file. can it be at run time?
0
 
LVL 2

Expert Comment

by:nir2002
Comment Utility
What you mean? your mdb will choose on the fly to which topic to be listen?
0
 

Author Comment

by:dannysh
Comment Utility
Yes, is it possible?
0
 
LVL 2

Expert Comment

by:nir2002
Comment Utility
As I recall spec, you can't but need to look the spec again for be sure.
0
 

Author Comment

by:dannysh
Comment Utility
Thnaks a lot Nir.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now