1.
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?
2.
Given an JMS message-driven bean, which statement is true about its exception handling?
3.
Which is a correct way to define a runtime exception as an EJB 3.x application exception?
4.
Given Singleton bean FooEJB:
FooEJB is packaged as the only bean in an ejb-jar and deployed to a server instance. Which represents the
output generated from FooEJB after the deployment has completed?
5.
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?
6.
A developer writes an interceptor class and a stateless session bean:
A client acquires an EJB reference to the FooLocal business interface and invokes the foo() method one
time. Which describes the output?
7.
A developer writes an interceptor class containing an AroundInvoke method, and applies it to the local
business interface method of a stateless session bean:
11. @Interceptors(FooInterceptor.class)
12. public void bar() ()

A client obtains a reference to the bean's local business interface, and calls the method bar two times from
the same thread. Assuming that the container dispatches both cell to the same stateless session bean
instance, how many instances of the FooInterceptor class will be used?
8.
A stateless session bean FooBean implements an asynchronous business method foo() on its bean class:
@Asynchronous
public void foo() ( ... )

The asynchronous business method is exposed through a remote business interface FooRemote. A caller
acquires an EJB reference to this bean and invokes it as follows:
100. fooRemoteRef.foo();

Which exception can result from the invocation on line 100?
9.
A developer impalements an asynchronous implementation for calculating insurance proposals. The input
data for the calculations is made available on a single message queue. Two types of insurance proposals
will be calculated: car and life. Message with data for other insurance types are posted on the queue but
should be left on the queue by this implementation. Which statement is true?
10.
Which is a valid use of the EJB 3.x TimerHandle object?