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: | Nov 15, 2026 |
| # of views: | 4638 |
|
|
|
MyMsg is a JMS message-driven bean with container-managed transaction demarcation. FooBean is an EJB 3.x stateless session bean that sends message to the JMS destination with MyMsgBean is associated.
MyMsgBean's message listener method has transaction attribute REQUIRED, and is defined as follows:
10.
public class MyMsgBean implements javax.jms.messageListener {
11.
public void onMessage(javax.jms.Message message) {
12.
/ / do some work not shown here
13.
thrown new RuntimeException("unexpected error . . . ");
14.
}
Which statement is true about the result of message processing?
A bean developer writes a stateless session bean FooEJB with the following asynchronous business method:
@Asynchronous
public Future<Integer> fooAsync () {
System.out.printIn ("begin");
int i = 1;
System.out.print("end");
Return new AsyncResult<Integer> (i);
}
Given the following code, where fooRef is an EJB reference to FooEJB: Future<Integer> fooFuture = fooref.fooAsync();
fooFuture.cancel (true);
Which two represents possible system output after all processing has completed? (Choose two)
A developer writes a stateful session bean FooBean with two local business interfaces Foo and bar. The developer wants to write a business method called getBar for interface Foo that returns a Bar reference to the same session bean identity on which the client onvokes getBar.
Which code, when inserted on line 12 below implements the getBar method with the wanted behavior?
10.
@Resource SessionContext sessionCtx;
11.
public Bar getbar () {
12.
13.
}
A developer writes a stateless session bean FooBean and uses its deployment descriptor to declare a local ejb dependency on a stateful session bean in the same ejb-jar.
Which environment annotation, when declared within the FooBean bean class, is equivalent to the ejb-local-ref shown above?
