struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Graham" <dgraham1...@hotmail.com>
Subject Re: Declarative exceptions design question...
Date Tue, 25 Mar 2003 16:44:51 GMT
Each layer should throw Exceptions appropriate to that layer and allow the 
calling layer transform them.  For example, your EJB can throw a 
RemoteException but that should never make it past the layer calling the 
EJB.  The calling layer should wrap it in an appropriate Exception.

David



>From: Mick.Knutson@ubsw.com
>Reply-To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
>To: <struts-user@jakarta.apache.org>
>Subject: Declarative exceptions design question...
>Date: Tue, 25 Mar 2003 17:06:40 +0100
>
>Declarative exceptions design question...
>
>I am using EJB's, Entity with Session Facades, then a BusinessDelegate on 
>top of that, then DispatchActions for this APP.
>As I understand, I can create simple Exception classes like 
>"LoginFailed.class" and when that error is thrown, I can declare the 
>handling of "LoginFailed.class" in the struts-config.xml.
>
>If I am correct thusfar, my question is this....
>Where should I be looking to put my declared Exceptions? Should I look for 
>various exception in my EJB layer and then transform them into these 
>declared Exception like "LoginFailed.class" in the BusinessDelegate? Or 
>should I just change those errors to a "TechnicalException.class" Exception 
>that I have, then transform the Exceptions in the DispatchAction class?
>
>
>
>=========
>Thank You
>
>Mick Knutson
>
>Sr. Designer - Project Trust
>aUBS AG, Financial - Zürich
>Office: +41 (0)1/234.42.75
>Internal: 48194
>Mobile: 079.726.14.26
>
>Visit our website at http://www.ubswarburg.com
>
>This message contains confidential information and is intended only
>for the individual named.  If you are not the named addressee you
>should not disseminate, distribute or copy this e-mail.  Please
>notify the sender immediately by e-mail if you have received this
>e-mail by mistake and delete this e-mail from your system.
>
>E-mail transmission cannot be guaranteed to be secure or error-free
>as information could be intercepted, corrupted, lost, destroyed,
>arrive late or incomplete, or contain viruses.  The sender therefore
>does not accept liability for any errors or omissions in the contents
>of this message which arise as a result of e-mail transmission.  If
>verification is required please request a hard-copy version.  This
>message is provided for informational purposes and should not be
>construed as a solicitation or offer to buy or sell any securities or
>related financial instruments.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*  
http://join.msn.com/?page=features/virus


---------------------------------------------------------------------
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