nerdexam
Oracle

1Z0-860 · Question #152

Given : public class MyException extends Exception {} The business interface Foo declares a method work0: I.public void work0 throws MyException; The bean class FooBean contains the following…

The correct answer is A. The container does notroll back the transaction. See the full explanation below for the reasoning.

Question

Given : public class MyException extends Exception {} The business interface Foo declares a method work0: I.public void work0 throws MyException; The bean class FooBean contains the following: 10.©Stateless II. @Remote(Foo.class) 12. public class FooBean { 13. public void workQ throws MyException { 14. //do some work not shown here 15. throw new MyException0; 16.} Assuming there is no deployment descriptor, which statement is true when the workQ method is invoked by a client with an existing transaction context and execution reaches Line 15?

Options

  • AThe container does notroll back the transaction.
  • BThe client receives javax.ejb.EJBTransactionRequiredException.
  • CThe client receives javax.ejb.EJBTransactionRolledbackException.
  • DThe container marks the transaction for rollback by calling the EJBContext.set RollbackOnly method.

How the community answered

(63 responses)
  • A
    71% (45)
  • B
    5% (3)
  • C
    8% (5)
  • D
    16% (10)

Community Discussion

No community discussion yet for this question.

Full 1Z0-860 Practice