which is correct?

Given this code snippet from a JMS message driven bean class X:

When this bean class handles a message, which is correct?

Given this code snippet from a JMS message driven bean class X:

When this bean class handles a message, which is correct?

A.
After a message delivery the result is 1.

B.
After a message delivery the result is 2.

C.
After a message delivery the result is 12.

D.
After a message delivery an exception is thrown.

E.
After a message delivery the result is unpredictable.

F.
This is NOT a compliant JMS message-driven bean.



Leave a Reply 3

Your email address will not be published. Required fields are marked *


Tamer

Tamer

C

Tamer

Tamer

Sorry, its ‘F’ the onMEssage method shouldnt throws any exception like its overiding method

Bruno Mathidios

Bruno Mathidios

Correct is F:
The signature of the onMessage method must follow these rules:

The return type must be void.

The method must have a single argument of type javax.jms.Message.