[ http://jira.andromda.org/browse/EJB-83?page=all ]
Olivier THIERRY updated EJB-83: ------------------------------- Attachment: returnNullIfNoResultException_patch.txt > No way to distinguish NoResultException from other exceptions when you call a > DAO query method > ---------------------------------------------------------------------------------------------- > > Key: EJB-83 > URL: http://jira.andromda.org/browse/EJB-83 > Project: EJB Cartridge > Type: Improvement > Environment: AndroMDA 3.3-SNAPSHOT + EJB3 cartridge > Reporter: Olivier THIERRY > Assignee: Vance Karimi > Attachments: returnNullIfNoResultException_patch.txt > > There's something wrong in the way DAOs query method are generated with EJB3 > cartridge. All exceptions thrown by Query are wrapped in a DaoException, > including NoResultException. So that when you call a DAO method and it throws > an exception, you have no easy way to know if the exception is thrown because > there is no result (which could be something expected) or because there is an > error in the request, a problem with the database, etc ... It would be better > to do like Hibernate cartridge does : if there is no result for the query, > the method returns null. For other exceptions, it throws an exception. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.andromda.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/