Hi, You should never explicitly throw a RemoteException as of EJB1.1 or later. Instead you should either throw an EJBException (or subclass thereof) in the case of a system exception or a subclass of Exception in the case of an application exception. The EJB Spec talks about this in detail in the "Exception Handling" section
As of EJB2.0, any System Exception/Unchecked exception caught by the EJB Container, while executing the method of the bean, is thrown as a RemoteException if the client is a remote client and EJBException if the client is a local client. As Viswanath said, the bean provider while coding the bean class, is responsible to catch the checked exception if any, wrap it in an EJBException and throw it as an EJBException. The container will catch this EJBException and rethrow it either as RemoteException or EJBException based on the client, if it is remote or local. RemoteException is a checked exception while EJBException is an unchecked exception. For more information about EJB Exception Handling, U can refer Ed Roman's book, Appendix E - Exception Reference, p:648
What you're saying is that we should only return EJBExceptions from business methods (as in the case for SLSB). But as far as I understand, that will ALWAYS cause a rollback to happen. And it's not always the case that we need rollbacks e.g. checking parameters to be non-null. So your advice is not entirely correct.