Regarding the question of MDB:
...
public void onMessage(Message message) throws java.rmi.RemoteException
...
The answer is "This is an invalid (i.e. non-compliant) EJB 3.x message driven bean."
A 3.x MDB is not allowed to throw RemoteException.
so, what types of exceptions are allowed to be in its throws clause ?

thanks