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.

Showing Answers 1 - 4 of 4 Answers

vibhor bhatia

  • Oct 17th, 2005
 

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.

  Was this answer useful?  Yes

ajazuddin

  • Dec 1st, 2005
 

it will throw the runtime exception.

  Was this answer useful?  Yes

hr1551

  • Jul 10th, 2007
 

It is not recommanded because business exception should be caught in compile time instead of run time.

  Was this answer useful?  Yes

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.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions