Oracle
1Z0-860 · Question #78
1Z0-860 Question #78: Real Exam Question with Answer & Explanation
The correct answer is C. @EJB(name="barRef,beanName-'BarBean"). See the full explanation below for the reasoning.
Question
A developer writes a stateless session bean FooBean and uses its deployment descriptor to declare a local ejb dependency on a stateful session bean in the same ejb-jar. <ejb-local-ref> <ejb-ref-name>barRef</ejb-ref-name> <local>acme.Bar</local> <ejb-link>BarBean</ejb-link> <injection-target> <injection-target-class>acme.FooBean</injection-target-class> <injection-target-name>bar</injection-target-name> </injection-target> </ej b-1 o c a I- ref> Which environment annotation, when declared within the FooBean bean class, is equivalent to the ejb-local-ref shown above?
Options
- A@EJB(beanName="BarBean")
- B@EJB(name="bar", beanName="BarBean")
- C@EJB(name="barRef,beanName-'BarBean")
- D@EJB(name="ejb/barRef, beanName-'BarBean")
Community Discussion
No community discussion yet for this question.