A remote business interface may extend java.rmi.Remote as we�ve done here,
although this is optional. Typically the container will perform byte-code enhancements during deployment to extend java.rmi.Remote if your bean interface does not extend it. Remote business interface methods are not required to throw java.rmi.RemoteException unless the business interface extends the java.rmi.Remote interface.
System exceptions include java.lang.RuntimeException and its subclasses. EJBException is a subclass of RuntimeException, so it is considered a system exception. System exceptions also include java.rmi.RemoteException and its subclasses. The RuntimeException and RemoteException subclasses differ in that they can be turned into application exceptions using the @javax.ejb.ApplicationException annotation.
In session beans, when a system exception occurs and the instance is discarded, a RuntimeException is always thrown whether the client is a remote or local invocation. If the client started the transaction, which was then propagated to the EJB, a system exception (thrown by the enterprise bean method) will be caught by the container and rethrown as a javax.ejb.EJBTransactionRolledbackException. EJBTransactionRolledbackException is a subtype of RuntimeException and gives a more explicit indication to the client that a rollback occurred. If the client did not propagate a transaction to the EJB, the system exception will be caught and rethrown as an EJBException.