File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes BMT and Session beans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "BMT and Session beans" Watch "BMT and Session beans" New topic
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: 916

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, OCPJBCD
Amirr Rafique
Ranch Hand

Joined: Nov 14, 2005
Posts: 324
Thanks mates.....

It is from java beat
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: BMT and Session beans
 
Similar Threads
Wrong Enthuware Answer
Wrong answer/explanation in com.enthuware.ets.scbcd.v5.2.161
Mock Questions: transactions
Bean Manage Transaction in Stateful Bean
Question in MDB