Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB 2.1 spec  RSS feed

 
Prannav Santhosh
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was going through the EJB2.1 spec and the below is what the spec say's (for example )
"For example, the Account enterprise bean may throw an application exception to report that a debit operation cannot be performed because of an insufficient balance. The Account bean should not use an application exception to report, for example, the failure to obtain a database connection."

If my bean access the database , for which some of the methods will throw SQLException and as per the above statement , so i should not be converting SQLException to my custom exception in my DAO layer?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suppose what you have to think is what benefit does your custom exception provide?

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!