Given an JMS message-driven bean, which statement is true about its exception handling?
A.
Its message listener method must NOT throw any checked exception.
B.
Its message listener method can throw java.rmi.RemoteException.
C.
Its message listener method can throw any checked exception except
java.rmi.RemoteException.
D.
Its message listener method can throw any checked exception that implements
java.io.Serializable.
I think the proposed answer is incorrect. In my opinion the answer is C.
A message-driven bean’s message listener method must not throw the java.rmi.RemoteException.
A message-driven bean’s message listener method must not have any throws clause so it can only throw runtime exception. A runtime exception can be a system exception or an application exception (if it is annotated with @ApplicationException). If it throws an application exception marked with rollback=true, the transaction (if any) is rolled back, the exception is rethrown to the resource adapter, and the bean is NOT discarded. If it throws a system exception, the exception is logged, the transaction (if any) is rolled back, and the bean is discarded.
A
The answer is correct review this paper sección 14.2.2
http://download.oracle.com/otndocs/jcp/ejb-3.1-pfd-oth-JSpec/