Solved

MDB or simple client

Posted on 2002-07-19
10
203 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
10 Comments
 
LVL 2

Expert Comment

by:nir2002
ID: 7167475
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
ID: 7167482
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
ID: 7167487
yes, it is server property.
please look at your application server documentation to see how to configure your server.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:dannysh
ID: 7167506
Nir thank you for your help.
   Danny Shaul
0
 
LVL 2

Expert Comment

by:nir2002
ID: 7167507
I glad I could help you
best regards
Nir :-)

0
 

Author Comment

by:dannysh
ID: 7167508
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
ID: 7167511
What you mean? your mdb will choose on the fly to which topic to be listen?
0
 

Author Comment

by:dannysh
ID: 7167512
Yes, is it possible?
0
 
LVL 2

Expert Comment

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

Author Comment

by:dannysh
ID: 7167514
Thnaks a lot Nir.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Android development question 2 108
Detect Closed Loops (circles, figure-8s, etc) in PNG Images 6 96
Is there a simpler dropbox system? 10 53
Java class and jar 3 59
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses

734 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