| Author |
BMT and Session beans
|
Amirr Rafique
Ranch Hand
Joined: Nov 14, 2005
Posts: 324
|
|
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
|
"Know where to find the solution and how to use it - that's the secret of success."
|
 |
Lee Kian Giap
Ranch Hand
Joined: Jan 23, 2008
Posts: 210
|
|
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.
|
SCJP 6, SCWCD 5, SCBCD 5
|
 |
Mihai Radulescu
Ranch Hand
Joined: Sep 18, 2003
Posts: 912
|
|
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
|
SCJP, SCJD, SCWCD
|
 |
Amirr Rafique
Ranch Hand
Joined: Nov 14, 2005
Posts: 324
|
|
Thanks mates.....
It is from java beat
|
 |
 |
|
|
subject: BMT and Session beans
|
|
|