Why are you throwing a generic exception like java.sql.SQLException?
Spring's DataAccessException (and many others) are designed to be
wrappers around this exception to give you much better information.

As far as exception handling goes - that's up to you to catch. Most
web frameworks have a way to declaratively say "when X exception gets
thrown, go to this page". However, I've yet to discover how to do this
with JSF.

Matt

On 8/24/07, sudheerp <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
>    I am using appfuse-jsf 1.9.4
>
>    Do I have to throw DataAccessException and java.sql.SQLException in the
> following HibernateSpringDAOImpl? How are database exceptions like DB
> unavailable, bad query etc are
> handled in appfuse-jsf?
>
>         public boolean FoundEmptyToDate( Long parentId ) throws
> DataAccessException, java.sql.SQLException
>         {
>                 String lsDate = null;
>                 DetachedCriteria criteria =
> DetachedCriteria.forClass(ConcernedPersons.class);
>             criteria.add(Expression.eq( "to_date", lsDate ));
>             List rowsWithEmptyToDate = getHibernateTemplate().findByCriteria(
> criteria );
>             if ( ( rowsWithEmptyToDate != null ) && ( 
> rowsWithEmptyToDate.size() >
> 0 ) )
>             {
>                 return true;
>             }
>             return false;
>         }
>
>    Thank you.
>
> Sudheer
> --
> View this message in context: 
> http://www.nabble.com/How-database-exceptions-are-handled-in-appfuse-jsf--tf4326971s2369.html#a12323441
> Sent from the AppFuse - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
http://raibledesigns.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to