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
Why do we call JavaScript an Object-based Language? In java language an JavaScript shares several similarities with object-oriented languages, and thus is known as an object-ba

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

Why hub is used in networks? HUB: Hub is networking component that can be used to connect the networks and it could also be used to extend the size of networks. In a simple way

To change c code and place into a java application Project Description: To change c code and place into a java application Skills required are C Programming, Java, Softwar

Explain in brief Java applet? It is a java program. It has been designed for transmitting Java code over the internet. It's automatically executed by Java-enabled W

In RPC the method invoker waits for the method to finish implementation and return the control back to the invoker. Therefore it is completely synchronous in nature. Whereas in JMS

Computer programming Project Description: Solving various problems about traffic jam Skills required: C# Programming, Java, C++ Programming, PHP, Software Architecture

In the airplane program, you may have noticed that the loading of each image appears to be jerky, erratic, or slow, and that the URL for each image flickers in the status bar each