GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  J2EE
Next Question 
 J2EE  |  Question 1 of 104    Print  
what happens if your business exception extends Runtime Exception
The complier thinks that the businness exception is a
Runtime exception , It just bypasses without any error message.



  
Total Answers and Comments: 4 Last Update: July 31, 2009     Asked by: Vinay Gowda 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
October 17, 2005 06:50:54   #1  
vibhor bhatia        

RE: what happens if your business exception extends R...
Any exception with runtime exception is an unchecked exception hence we don't need to check it and will be handled on its own! Primarily any exception whose handling costs seems to be too much should be be an unchecked exception.
 
Is this answer useful? Yes | No
December 01, 2005 22:10:22   #2  
ajazuddin        

RE: what happens if your business exception extends R...

it will throw the runtime exception.


 
Is this answer useful? Yes | No
July 10, 2007 10:43:33   #3  
hr1551 Member Since: July 2007   Contribution: 1    

RE: what happens if your business exception extends R...
It is not recommanded because business exception should be caught in compile time instead of run time.
 
Is this answer useful? Yes | No
July 31, 2009 03:30:59   #4  
krishna_ballabh Member Since: July 2009   Contribution: 2    

RE: what happens if your business exception extends Runtime Exception
Extending the Runtime Exception means you are giving the definition of your exception as System Exception for each System Exception your container will do a different process mean what ever transaction you have would be rolled back and the instance of the current stateless would be destroyed. If you are using a Stateless bean you will not get too much of effect apart from an exception but in case of Statefull your bean will no longer be available to serve your other request in same session.
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape