GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  EJB
Go To First  |  Previous Question  |  Next Question 
 EJB  |  Question 170 of 175    Print  
How do you throw EJB/SQL exceptions to front-end/presentation layer ?

  
Total Answers and Comments: 1 Last Update: March 09, 2008     Asked by: subbu 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
March 09, 2008 13:00:11   #1  
santanu_nandi Member Since: March 2008   Contribution: 1    

RE: How do you throw EJB/SQL exceptions to front-end/presentation layer ?
Inside the EJB code you put a try catch block. Inside the catch block you throw new EJBException. In the method signature also you declare that the method will thow the exception and not handle it.

At the client side(assuming there is a Front-end/presentation layer), you put the code which invokes an EJB business method inside try catch block and here there will be a matching RemoteException handler. Within the  RemoteException handler you can handle the Exception.

 
Is this answer useful? Yes | No

 Related Questions

If i throw a custom ApplicationException from a business method in Entity bean which is participating in a transaction, would the transaction be rolled back by container. Does container rolls back transaction only in case of SystemExceptions
Answer posted by Mohan on 2005-05-21 17:21:54: yes the rollback will occur 

What is the diff between interface and abstract class?why interfaces?why packages?why abstract class?what is the diff between uncheked exception,checked exceptions?why jvm works internally?why java does not support pointers?what is diff bet callby value and call by reference in java?
Read Answers (8) | Asked by : balaraju
Tags : Abstract

Latest Answer : Inside the EJB code you put a try catch block. Inside the catch block you throw new EJBException. In the method signature also you declare that the method will thow the exception and not handle it.At the client side(assuming there is a Front-end/presentation ...
Read Answers (1) | Asked by : subbu


 Sponsored Links

 
Related Articles

N-Tier Architecture: Data Access Layer

N Tier Architecture Data Access Layer In an N Tier architecture the data access layer consists of components that aid one in the process of accessing the database When it is used correctly the data access layer serves as an abstract level for the structures of the database Simple changes that are ma
 

N-Tier Architecture: The Business Rules Layer

N Tier Architecture The Business Rules Layer Business Rules Layer in N Tier Architectures The Business Rules Layer in an N Tier architecture is that layer that contains the Business logic and or Business rules of the application Reserving a separate layer strictly for Business logic in an N Tier arc
 

N-Tier Architecture Presentation Logic Layer

N Tier Architecture Presentation Logic Layer Composition of the Presentation Layer The Presentation Layer in an N Tier structure is commonly referred to as the client” layer It consists of parts that are used to present data to an end user Examples of components on the Presentation Layer
 

What is Data Layer Exclusion

Modern data warehouses are becoming more and more powerful. In the past, data warehouses can only present statistical reports in flat table formats. But data warehouses can supply data and, in conjunction with other application such as geographic information systems (GIS), reports can be done in gr
 

What is Data Layer

Spatial Data is a kind of data that reflects the real world which has become too complex for the direct and immediate understanding of data consumers. Spatial Data are used to create models of reality and designed to have some similarity with selected aspects of the real world including status and n
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 

HR Interview - HR Interview Mistakes You Will Want To Avoid

HR Interview Mistakes You Will Want To Avoid The job interview can be a stressful process This is especially true for those who are going after a competitive position Your nonverbal communication combined with the answers you give during the interview will determine if you are hired mosgoogle While
 

HR Interview - Behavioral HR Interviews

Behavioral HR Interviews As the name implies a behavioral interview is an interview that is held by a human resources department to determine if an applicant has the behaviors that are appropriate for a job The company must know how an applicant will behave in a certain situations mosgoogle The logi
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape