Free Oracle 1Z0-895 Exam Dumps Questions & Answers
| Exam Code/Number: | 1Z0-895Join the discussion |
| Exam Name: | Java EE 6 Enterprise JavaBeans Developer Certified Expert |
| Certification: | Oracle |
| Free Question Number: | 90 |
| Publish Date: | Aug 19, 2026 |
| # of views: | 4308 |
|
|
|
Given the following code in an EJB session bean:
Which code, inserted at Line 15, portably looks up the injected resource?
Which two annotations can be applied at the class, method, and field levels? (Choose two.)
Given two stateless session beans, ABean and BBean:
A client that is not executing within a transaction acquires an EJB reference to ABean and invokes the a() method on time. How many distinct transactions are started by the container after all
processing has completed?
A developer wants to write a stateful session bean using the following interface as local business interface:
1.package acme;
2.public interface Bar {
3.public void bar ();
4.}
Assuming there is not an ejb-jar.xml file, which code can be inserted into Lines 4-6 below to define the bean with the ejb name of BarBean?
1.package acme;
2.import javax.ejb.*;
3.import java.io.*;
4.5.
6.7.
}
A developer writes a stateless session bean FooBean with one remote business interface FooRemote containing one business method foo. Method foo takes a single parameter of application-defined type MyData.
11.
public class MyData implements java.io.Serialization {
12.
int a;
13.
}
Methods foo is implemented with the FooBean class as:
11.
public void foo (MyData data) {
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 MyData();
12.
data.a = 1;
13.
fooRef.foo(data);
14.
System.out.printIn(data.a);
What is the value of data.a when control reaches Line 14 of the client?