Free Oracle 1Z0-860 Exam Questions (page: 18)

12. data.a = 2; 13.}
Another session bean within the same application has a reference to FooRemote in variable
fooRef and calls method foo with the following code:
11. MyData data = new MyDatafJ;
12. data.a = 1;
13. fooRef.foo(data);
14. System, out. println(data. a);
What is the value of data, a when control reaches Line 14 of the client ?

A. 0
B. 1
C. 2
D. either1or 2
Answer(s): B
QUESTION: 48
EJB 3.0 containers must provide a specific subset of which two APIs? (Choose two.

A. JSP APIs
B. JavaMailAPIs
C. JAX-WS APIs
D. Java CardAPIs
E. Sun Studio APIs
Answer(s): B, C
QUESTION: 49
Given the following code in an EJB 3.0 session bean:
10. @Resource(name="jdbc/employeeDB")
11. private DataSource dataSource;
12.
13. public void lookupEmployee(String id) {
14. InitialContext ic = new InitialContextO;
15. // insert code here
16. DataSource ds = (DataSource) obj;
17.}
Which code, inserted at Line 15, portably looks up the injected resource?

A. Object obj = ic.lookup("employeeDB");
B. Object obj = ic.lookup("dataSource");
C. Object obj = ic.lookup("jdbc/employeeDB");
D. Object obj = ic.lookup("javacomp/env/employeeDB");
E. Object obj = ic.lookup("java:comp/env/jdbc/employeeDB");
Answer(s): E
QUESTION: 50


19

Viewing page 18 of 108



Post your Comments and Discuss Oracle 1Z0-860 exam prep with other Community members:

1Z0-860 Exam Discussions & Posts