• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

My exam cloud mock 4, setRollbackOnly()

 
Ranch Hand
Posts: 1749
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


A session bean calls the setRollbackOnly method on the EJBContext interface within a business method with an active transaction.
Which of the following statements are true?
A. The transaction timeout is immediately disable.
B. The container will ensure that the transaction will never commit.
C. The bean must have started the current transaction for this to be legal.
D. The bean must have bean-managed transaction demarcation for this to be legal.
E. The bean must have container-managed transaction demarcation for this to be legal.
Given answer: B,E



In Ivan's EJB exam study guide,  


"According to the EJB 3.1 specification, the setRollbackOnly and getRollbackOnly methods
are not available in PostConstruct methods of stateless session beans since these methods
are executed in an unspecified transaction context. "


Based on what Ivan's notes, C should be correct if the bean is a CMT bean. It is because setRollbackonly is applicable to an active transaction , not applicable to an unspecified transaction context.

 
Creator of Enthuware JWS+ V6
Posts: 3293
296
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Based on what Ivan's notes, C should be correct if the bean is a CMT bean.


I agree, but the answer states "The bean must..." instead of "The container must...." so it can't be a CMT.
 
That's a very big dog. I think I want to go home now and hug this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!