• 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
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

My exam cloud mock 4, setRollbackOnly()  RSS feed

 
Ranch Hand
Posts: 1732
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: 3273
296
Android Chrome Eclipse IDE
  • 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.
 
On top of spaghetti all covered in cheese, there was this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!