Oracle
1Z0-860 · Question #87
1Z0-860 Question #87: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-860 to reveal the answer and full explanation for question #87. The question stem and answer options stay visible for context.
Question
A developer writes an enterprise application and packages it into an enterprise archive (EAR). The application contains one persistence unit with unit name "FooPU". The application also contains an ejb-jar with one stateless session bean. Which code, when added to the stateless session bean class, injects a container-managed persistence context at runtime?
Options
- A@PersistenceContext EntityManager em;
- B@Resource(unitName="FooPU") EntityManager em;
- C@PersistenceUnit(unitName="FooPU") EntityManager em;
- D@PersistenceContext(unitName="persistence/FooPU") EntityManager em;
Unlock 1Z0-860 to see the answer
You've previewed enough free 1Z0-860 questions. Unlock 1Z0-860 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.