Oracle
1Z0-895 · Question #35
Given the following code in an EJB session bean: Which code, inserted at Line 15, portably looks up the injected resource?
The correct answer is E. Object obj= ic.lookup ("java:cmp/env/jdbc/employeeDB). See the full explanation below for the reasoning.
Question
Given the following code in an EJB session bean: Which code, inserted at Line 15, portably looks up the injected resource?
Exhibit
Options
- AObject obj = ic.lookup ("employeeDB");
- BObject obj = ic.lookup ("dataSource");
- CObject obj = ic.lookup ("jdbc/employeeDB");
- DObject obj = ic.lookup ("java:comp/env/employeeDB");
- EObject obj= ic.lookup ("java:cmp/env/jdbc/employeeDB);
How the community answered
(19 responses)- B5% (1)
- C11% (2)
- E84% (16)
Community Discussion
No community discussion yet for this question.
