Explain the categories of exceptions in EJB.Application Exception: This is one of the exceptions which was declared on the method signature. The business work flow treats this as a special scenario, in the remote interface. If it is thrown, a client is given an option called recovery option which entails the request processing in different way.
System Exception: This is one of the exceptions which can not be recovered by an EJB method. It can be a checked exception or an unchecked exception. If it is treated as an unchecked exception by the EJB conainer the transaction will be rolled back and perform the necessary cleanup, and the container throws an RemoteException to the client.
Explain the categories of exceptions in EJBExceptions are categorized in EJB based on whether they are recoverable or no, based on this parameter there are two categories of exceptions in EJB.
Application Exception: This is one of the exceptions which were declared on the method signature. The business work flow treats this as a special scenario, in the remote interface. If it is thrown a client is given an option called recovery option which entails the request processing in different way. eg: Incorrect username/password.
System Exception: This is one of the exceptions which can not be recovered by an EJB method. It can be a checked exception or an unchecked exception. If it is treated as an unchecked exception by the EJB container the transaction will be rolled back and perform the necessary cleanup, and the container throws a RemoteException to the client. eg: Database crash.
|