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

Pseudocode, Create an application for an animal-fur trimming service. The b...

Create an application for an animal-fur trimming service. The business is open 15 weeks of the year, from April through July. The fee for a small animal (under 6 pounds) is $100, a

What is the use of lookupdispatchaction, LookupDispatchAction is useful if ...

LookupDispatchAction is useful if the method name in the Action is not driven by its name in the front end, but by the Locale independent key into the resource bundle. As the key i

Describe about applet security, Describe about Applet Security? The pos...

Describe about Applet Security? The possibility of surfing the Net, wandering across a random page, playing an applet and catching a virus is a fear in which has scared several

A session facade? , Too many function invocations between the server and th...

Too many function invocations between the server and the client will lead to network overhead, tight coupling due to dependencies between the server and the client, misuse of serve

GUI, How can I connect my java application with xampp

How can I connect my java application with xampp

Authentication -security component, Authentication is basically an identifi...

Authentication is basically an identification step. Functionality used for J2EE security: Principal : An entity that may be authenticated and identified. Principal n

What do you mean through ftp or file transfer protocol, What do you mean th...

What do you mean through FTP or File Transfer Protocol? FTP: File transfer protocol was first introduced in the year of 1973; it standardized the transfer of files among comp

Explain the role of remote interface in rmi, The Remote interface serves to...

The Remote interface serves to recognize interfaces whose methods may be invoked from a non-local virtual machine. Any object that is a remote object must directly or indirectly ex

What is a framework, A framework is made up of the set of classes which per...

A framework is made up of the set of classes which permit us to use a library in a best possible way for a particular requirement.

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