The Source for Java Technology Collaboration
User: Password:



Start New Message Delete Post a Reply

Article: 
 Exception-Handling Antipatterns
Subject:  Log and Throw in a Session Facade
Date:  2006-04-07 09:21:14
From:  timmccune
Response to: Log and Throw in a Session Facade


It's been too long since I read the EJB2 spec, so I'm not sure what it says on this, but the EJB3 spec mandates that if an EJB throws a system exception, the EJB container must log the error and then throw it back to the client. If an EJB throws an application exception, the container should just throw it. This makes sense to me. Regardless, your EJB should not do any log and throw on its own.

 Feed java.net RSS Feeds