Exception handling in EJB, JAVA Programming

Assignment Help:

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.

 


Related Discussions:- Exception handling in EJB

What is a local member and a class variable, What is a local, member and a ...

What is a local, member and a class variable? Variables declared within a method are "local" variables. Variables declared within the class i.e not within any methods are "m

Print the percentage of each nucleotide, 1. In this lab assignment we will ...

1. In this lab assignment we will be using the vim or emacs editor in addition to the commands we have already learned. Open a shell terminal and create a file named in your home d

Design a program for robot, Assume all the obstacles are of height 4 units ...

Assume all the obstacles are of height 4 units and the blocks are of heights 1 (bottom), 2 (top), 1 and 2 (top) units respectively.  Complete the control() method of the RobotContr

Discuss features of java, Question 1 Discuss features of JAVA Question...

Question 1 Discuss features of JAVA Question 2 What are primitive data types? Discuss Question 3 Explain data conversion function ValueOf ()? Question 4 What are th

What is the use of forwardaction, Normal 0 false false fals...

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

Game, any example of games that is created by java ?

any example of games that is created by java ?

Minimum spanning tree based heuristic, Problem description: A travelling s...

Problem description: A travelling salesman wants to make a tour of the cities and returns back to the starting point. What is the minimum length tour? Formal Definiti

Java 2 micro edition - programming for mobile phones, You must design, code...

You must design, code and demonstrate a J2ME program (a program capable of running on mobile telephones) according to the specification given in the next section.  The overall cour

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd