nerdexam
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

1Z0-895 question #35 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)
  • B
    5% (1)
  • C
    11% (2)
  • E
    84% (16)

Community Discussion

No community discussion yet for this question.

Full 1Z0-895 Practice