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
The hashCode() and equals() methods have to be very important, when objects implementing these two functions are added to collections. If not implemented or implemented incorre

how to Using polymorphism to write a program to display digital clock?

how to write a program to assign value of variable age and print if person is major.

Write a programme to create a webpage that prints the name of the STUDENT database in Wide Latin font and set the subtitle with description of the STUDENT to the screen. Set the pa

Need tomcat based iptv cms p2p , avrelay trans-coder software Project Description: Tomcat based iptv cms p2p tracker cdn included, avrelay for trans-coding h264, Skills re

Describe about the term Access Protection ? Global variables are a typical cause of bugs in most programming languages. A few unknown function can modify the value of a variabl

Iterate through list of Fish. For each fish that isAlive, do the following: * * 1. If this fishIsSurroundedByRocks, DO NOTHING, and move on to the next fish. * (This f

Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

Explain the difference between pre-emptive scheduling and time slicing ?

I am requiring webcam software integrated into my site I have website and I am wanting webcam software integrated into my site the company I have found doesn't offer support in