Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

message driven beans

 
Miki Muzsi
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem

Which of the following must be supported by J2EE 2.0 Application
server regarding the deployment of message driven beans?


Options

Select 2 correct options.

1. It must allow deployment of a Message Driven Bean to listen for
multiple JMS queues.

2. It must allow deployment of multiple Message Driven Beans to listen
for single JMS queue.

3. It must allow deployment of a Message Driven Bean to listen for
durable subscriptions.

4. It must allow deployment of multiple Message Driven Beans in same
application to listen for single JMS queue.

5. It must allow deployment of a Message Driven Bean associated with a
JMS queue.

Answer: 3,5

Could anybody comment on this? I am not sure I understand what is the difference between 2 and 5.
 
sawan parihar
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure I understand what is the difference between 2 and 5
2) It must allow deployment of multiple Message Driven Beans to listen
for single JMS queue.


Only one MDB should be deployed to listen to single JMS queue. If the server allows multiple MDBs to listen for single JMS queue then the behaviour is undefined. That means specs doesn;t say anything about which MDB will get the message.


It must allow deployment of a Message Driven Bean associated with a JMS queue

This point is correct as it is required by the specs that server should allow to associate 1 MBD with 1 JMS queue.


Hope that helps.
 
Miki Muzsi
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sawan , thanks for the answer. I did not read correctly the question, since I understood that 2 and 5 are different in "to listen
for single JMS queue" and "associated with a JMS queue". Where actually it is about multiple beans listening to a queue or one bean associated with a queue.

Miki
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic