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

Object diagrams, Object diagrams define instances instead of classes. They ...

Object diagrams define instances instead of classes. They are useful for illustrating some complicated objects in detail about their recursive relationships.     When

Convert US Dollars to Canadian Dollars, How to write a program that convert...

How to write a program that converts US dollars into Canadian dollars.The program let the user enter an amount in US dollars and display it equivalent value in Canadian dollars whe

Prepare a game in corona, Prepare a Game in Corona (for Android and IOS) ...

Prepare a Game in Corona (for Android and IOS) Project Description: We are looking to prepare a game for mobile platform similar to Zombie Smasher for iOS and Android. Eve

Project on web service with complex data, This project is based on the team...

This project is based on the teams example of chapter 1. Instead of teams, you will consider employees working in a department in a company. (Departments and employees are analog

A one page website where a user can input the information, A one page websi...

A one page website where a user can input the information including Company Name, Title, Activity, R/S, I also need the user to select the start date, end date, and check poi

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 complete application to play game tic-tac-toe, (Tic-Tac-Toe)  Create...

(Tic-Tac-Toe)  Create class TicTacToe that will enable you to write a complete application to play the game of Tic-Tac-Toe. The class contains a private 3-by-3 rectangular array o

Require assistance in java / grails support, require assistance in Java / G...

require assistance in Java / Grails support We have a project which requires continuous maintenance / support and occasional feature development. Its running on Java 1.7 / Grail

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