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

Action listener and event listener, differende between action listener and ...

differende between action listener and event listener

Explain the equals() method, Explain the equals() method The equals() m...

Explain the equals() method The equals() method of java.lang.Object acts the similar as the == operator; that is, it tests for object identity rather than object equality. The

Use of unicastremoteobject in rmi, What is the use of UnicastRemoteObject i...

What is the use of UnicastRemoteObject in RMI? Ans) The UnicastRemoteObject class gives support for point-to-point active object references using TCP streams. Objects that need

Midlet game, do you have example of a simple midlet game ?

do you have example of a simple midlet game ?

Use javascript create some basic client-side validation, The last exercise ...

The last exercise of each assignment will be continuous from assignment to assignment and will have the goal of building an e-store website by the end of the course. Date & Tim

What are different parts of autowire types, There are four different parts ...

There are four different parts by which autowiring can be done. ? byName ? constructor ? autodetect ? byType

Program, Develop a code for fibonacci series

Develop a code for fibonacci series

Complete back end and front end development, Complete Back end and Front En...

Complete Back end and Front End Development Project Description: This work is a part of ongoing project. The need is to prepare and integrate the web part of this project.

What type of operations takes place inside microprocessors, What type of op...

What type of operations takes place inside Microprocessors Building Blocks? Enlist them along with brief description. Bus Interface Unit: The bus interface unit is the part o

What is aop alliance, AOP Alliance is an open-source project whose goal is ...

AOP Alliance is an open-source project whose goal is to promote adoption of AOP and interoperability between different AOP implementations by describing a common set of interfaces

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