Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mock question

 
Sanju Thomas
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

This is one of the questions from ejbcertificate.com.

The answers given are 1 and 5.

But i think only 1 is right, because the fifth is telling that send an acknowledgement to the message service when the transaction has failed. Is it so ? acknowledgment is only for failed transaction ?

Can any one help me to solve my doubt ??

The question

Which of the following statements are true about acknowledgement of messages within message-driven beans? [Check all correct answers]

1. A message arrived in onMessage() is placed back on the message queue if the transaction rolls back for container managed message beans.

2. A message arrived in onMessage() within a container managed message bean is placed back on the message queue when the onMessage() method returns false.

3. A message arrived in onMessage() within a container managed message bean is placed back on the message queue when the onMessage() throws a checked exception.

4. A container managed message bean can use the deployment descriptor to define how messages are acknowledged to the message service.


5. The <acknowledge-mode> attribute defines the way bean managed message bean's send an acknowledgement to the message service when the transaction has failed.
 
Gaurav Chikara
Ranch Hand
Posts: 412
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This forum is for osting results and not for asking questions
Pls ask them on SCBCD forum
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic