[ http://jira.andromda.org/browse/EJB-83?page=all ]

Olivier THIERRY updated EJB-83:
-------------------------------

    Attachment: patch-ejb-83.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: patch-ejb-83.txt, 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: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

Reply via email to