• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

BMT and Session beans

 
Amirr Rafique
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
19) Which of the following statements are correct with bean-managed transaction demarcation?
a. A Stateful session bean must commit or rollback the transaction before the completion of the business method.
b. A Stateless session bean must commit or rollback the transaction before the completion of the business method.
c. A message-driven bean must commit or rollback the transaction before the completion of the business method.
d. None of the above.


The given correct answer is a. Shouldn't the answer be [b,c].

Please confirm

Thanks
 
Lee Kian Giap
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also think that the answer is B and C. Maybe the question actually want to ask which statement is wrong ...

because for A, It is not a must for a stateful session bean instance to commit or rollback the transaction before the completion of business method. The container will retain the association of the transaction with the bean through out methods call untill the transaction is completed.
 
Mihai Radulescu
Ranch Hand
Posts: 918
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys

I also think that b and c are the correct answer, the SLSB and the MDB does have state thats why you need to must complete the trasaction before a business method ends. It must be a mistake.

Amirr , which is the provenience for this question ?

Regards,
Mihai
 
Amirr Rafique
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks mates.....

It is from java beat
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic