struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hubert Rabago <jakartau...@yahoo.com>
Subject RE: [OT] Handling database connection exceptions
Date Mon, 17 Nov 2003 23:35:58 GMT
> understood where I'm coming from! As I said, the
> database connection is accessed from a Data Access
> class (read model), which is called from my
> DispatchAction class. Since the exception is not
> caught in my DispatchAction class (the methods throw

Since the connection is being accessed from a Data Access class called
by the DispatchAction class, why don't you try to catch it in your
Action object?

If this violates your design or your looking for alternatives,
take a look at the <exception> handlers in Struts.

        <exception
            type="java.lang.NullPointerException"
            handler="com.you.NullPointerExceptionHandler"
            ... />

http://jakarta.apache.org/struts/api/org/apache/struts/action/ExceptionHandler.html

--- Shyam A <struts_newbie@yahoo.com> wrote:
> Wendy,
> 
> Thanks for your mail. I don't know if you fully
> understood where I'm coming from! As I said, the
> database connection is accessed from a Data Access
> class (read model), which is called from my
> DispatchAction class. Since the exception is not
> caught in my DispatchAction class (the methods throw
> Exception), it is propagated to my JSP's. It doesn't
> mean my JSP's directly access the database!
> 
> Anyway, thanks for your help.
> 
> Shyam
> 
> 


__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message