nerdexam
Oracle

1Z0-860 · Question #257

A CMT session bean named MrBean contains a method storeStuff which is annotated as follows: 22. @TransactionAttributeO"ransactionAttributeType.REQUIRES_NEW) 23. public void storeStuffO { All other…

The correct answer is B. All methods of MrBean have transaction attribute NONSUPPORTED. See the full explanation below for the reasoning.

Question

A CMT session bean named MrBean contains a method storeStuff which is annotated as follows: 22. @TransactionAttributeO"ransactionAttributeType.REQUIRES_NEW) 23. public void storeStuffO { All other methods of this bean have no transaction annotations. Given the following part of an ejb- jar.xml: 23. <container-transaction> 24. <method> 25. <ejb-name>MrBean</ejb-name> 26. <method-name>*</method-name> 27. </method> 28. <transaction-attribute>NotSupported</transaction-attribute> 29. </container-transaction> Which statement is correct about the methods in MrBean?

Options

  • AAll methods of MrBean have transaction attribute REQUIRED.
  • BAll methods of MrBean have transaction attribute NONSUPPORTED.
  • CMethod store Stuff has transaction attribute REQUIRES_NEW and the other methods have transaction
  • DMethod store Stuff has transaction attribute NONSUPPORTED and the other methods have transaction
  • EMethod store Stuff has transaction attribute REQUIRES NEW and the other methods have transaction

How the community answered

(26 responses)
  • A
    4% (1)
  • B
    85% (22)
  • C
    4% (1)
  • D
    8% (2)

Community Discussion

No community discussion yet for this question.

Full 1Z0-860 Practice