nerdexam
Oracle

1Z0-860 · Question #73

FooBean and BarBean are both EJB 3.0 stateless session beans with container-managed transaction demarcation. All business methods in the two beans have transaction attribute REQUIRED. The business…

The correct answer is C. FooBean.foo method receives javax.ejb.EJBTransactionRolledbackException. See the full explanation below for the reasoning.

Question

FooBean and BarBean are both EJB 3.0 stateless session beans with container-managed transaction demarcation. All business methods in the two beans have transaction attribute REQUIRED. The business method foo in FooBean invokes the business method bar in BarBean. Given : 10. public class BarBean { 11. public void bar0{ 12. throw new EJBException("unexpected error..."); 13.} Which statement is true about the result of this method invocation assuming execution reaches Line 12?

Options

  • AThe container might roll back the transaction.
  • BThe BarBean bean instance is in the ready state for the next invocation.
  • CFooBean.foo method receives javax.ejb.EJBTransactionRolledbackException.
  • DFooBean.foo method receives javax.transaction.InvalidTransactionException.

How the community answered

(49 responses)
  • A
    2% (1)
  • B
    4% (2)
  • C
    82% (40)
  • D
    12% (6)

Community Discussion

No community discussion yet for this question.

Full 1Z0-860 Practice