• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

My exam cloud mock 4, setRollbackOnly()

 
Bartender
Posts: 2446
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 3412
320
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic