nerdexam
Oracle

1Z0-860 · Question #124

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

The correct answer is A. FooBean.foo method receives javax.ejb.EJBException. 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 FooBean have transaction attribute REQUIRED, and all business methods in BarBean have transaction attribute REQUIRES_NEW. 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 RuntimeException("unexpected error..."); 13.} Which is true about the result of this method invocation assuming execution reaches Line 12?

Options

  • AFooBean.foo method receives javax.ejb.EJBException.
  • BThe BarBean bean instance is in ready state for the next invocation.
  • CFooBean.foo method receives javax.ejb.EJBTransactionRolledbackException.
  • DFooBean.foo method receives the original RuntimeException thrown from BarBean.bar method.

How the community answered

(19 responses)
  • A
    74% (14)
  • B
    11% (2)
  • C
    5% (1)
  • D
    11% (2)

Community Discussion

No community discussion yet for this question.

Full 1Z0-860 Practice