Exception handling in EJB, JAVA Programming

Java has two kinds of exceptions:

1. Checked exception: handled from java.lang.Exception but not java.lang.RuntimeException.

2. Unchecked exception: handled from java.lang.RuntimeException thrown by JVM.

 

1273_Exception handling in EJB.png

 

EJB has two kinds of exceptions:

1. System   Exception :   is   an   unchecked   exception produced   from java.lang.RuntimeException.   An EJBException is an unchecked exception, which is started from java.lang.RuntimeException.

2. Application Exception : is generic to an application and thrown because of violation of business rules. An Application Exception is a checked exception that is either described by the bean developer and does not import java.rmi.RemoteException.

A  System  Exception  is  given  by  the  system  and  is  not  recoverable. Because the System Exceptions are unpredictable when they occur, the EJB container is the only one responsible for trapping the System Exceptions. The container usually wraps any RuntimeException in RemoteException, which subsequently puts thrown to the caller. In addition to intercepting System Exception the container can give the errors.

 

Posted Date: 7/27/2012 4:26:31 AM | Location : United States







Related Discussions:- Exception handling in EJB, Assignment Help, Ask Question on Exception handling in EJB, Get Answer, Expert's Help, Exception handling in EJB Discussions

Write discussion on Exception handling in EJB
Your posts are moderated
Related Questions
What is the preferred organizational structure for the organization? Preferred Organizational Structure for organization is hierarchal. Where there is various departments inter

Explain Vector or Object-Oriented Graphics? The representation of graphical objects, like as lines, circles, arcs, and rectangles, along with mathematical formulas. This techni

Write code in JavaScript language to show the odd numbers among 20 to 100 using FOR statement. Note: No requirement to write whole HTML program. Just JavaScript code of need p

A point-to-point model is based on the concept of a message queue: Senders send messages into the queue, and the receiver reads messages from this queue. In the point-to-point mode

Develop a Adobe Air Native Extension Project Description: We are seeking someone that must create an adobe native extension for the subsequent SDK: Develop a Adobe Air Nat

It helps to resolve naming conflicts when different packages have classes with the same names. This also helps you prepare files within your project. As define : java.io package d

Struts framework                            J a v a Server Faces More matured since Struts has been started for a few years. It has got var


SCHOOL MANAGEMENT SYSTEM

Defiine the term Object ? Object is a named collection of properties (data, state) & techniques (instructions, behavior). Mainly Objects are key to understanding object-oriente