Oracle
1Z0-860 · Question #267
A developer writes a stateful session bean with local business interface Bar containing method test. Method test is implemented as 11. ©Remove 12. public void testfj {} A business method in a…
The correct answer is B. Ajavax.ejb.NoSuchEJBException is thrown. See the full explanation below for the reasoning.
Question
A developer writes a stateful session bean with local business interface Bar containing method test. Method test is implemented as 11. ©Remove 12. public void testfj {} A business method in a stateless session bean invokes a reference to bean Bar as follows : 11. @EJB Bar bar; 12. 13. public void foo0 { 14. bar.testfj; 15. bar.testO; 16.} Assuming execution reaches Line 15, what is the expected result?
Options
- AMethod foo returns without error.
- BAjavax.ejb.NoSuchEJBException is thrown.
- CAjava.rmi.NoSuchObjectException is thrown.
- DAjavax.ejb.NoSuchEntityException is thrown.
How the community answered
(23 responses)- A4% (1)
- B74% (17)
- C4% (1)
- D17% (4)
Community Discussion
No community discussion yet for this question.