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
Development of an Android app urgent Project Description: I am searching for some good android developer who has depth in knowledge of making an app. I am focusing on a certa

The flow control statements give you to conditionally execute statements, to repeatedly operate a block of statements, or to just modify the sequential flow of control.

I need Java Web Applications Development Project Description: MySQL databases, Oracle. SVN, GIT team collaborations. Skills required: Java, SQL, Software Architectur

Explain final fields ? You may also declare fields to be final. This is not the similar thing as declaring a method or class to be final. While a field is declared final, it is

What do mean by synchronized methods and synchronized statements ?

Prepare a Game in Corona for Android and IOS Project Description: We want to develop a game for mobile platform same as Zombie Smasher for iOS and Android. Everything is r

how to imlement thomas'' write rule?

Write a program that prompts for two people’s birthdays (month and day), along with today’s month and day. The program should figure out how many days remain until each user’s birt

Write JavaScript code to convert the number 236.2363611111556 into currency format and JavaScript statement to show output? Var input_amt = 236.2363611111556 ; mid_data = input

A portal is a service or a Web site that gives broad range of services and resources like e-mail, forums, search engines, weather information, news, on-line shopping, stock quotes.