Quiz

1:A developer uses a bean-managed transaction in a stateful session bean when
  1. Accessing legacy systems

  2. Implementing the SessionSynchronization interface

  3. Implementing JTA to control user transactions

  4. Controlling transactions using the setRollBack() method

A1: A, C
2:In which one of the following is it appropriate to implement SessionSynchronization?
  1. Stateful session beans

  2. Session beans with container-managed transactions

  3. Container-managed persistent entity beans

  4. Session beans with bean-managed transactions

A2: A
3:Transaction isolation levels in EJBs are
  1. Set by the EJB developer for bean-managed transactions

  2. Set by the deployer for container-managed transactions

  3. Specified to the method level

  4. Specified to the class level only

A3: A

Get Sams Teach Yourself EJB in 21 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.