Explain the categories of exceptions in EJB

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 EJB

Exceptions 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.
What are the advantages of JTA over JTS?
Advantages of JTA over JTS - Java Transaction API provides simple and flexible environment for the developer. It offers high-level X / Open Call Level Interface and low-level XA Call Level Interface..
How JTS solves the problems encountered by distributed objects
How JTS solves the problems encountered by distributed objects - The transactional semantics participation into object oriented components needs an extension of the Transaction Control Model..
Explain SWT and JFace
Explain SWT and JFace - Standard Widget Toolkit (SWT): SWT is an open source widget tool kit for developing rich, efficient and portable GUI applications..
Post your comment