Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JBoss User »

RE: [JBoss-user] exception handling advice

Brian McSweeney

2003-09-11

Replies:

Thanks for the response Mathew,

I'll look into the business delegate pattern, however
I'm still confused as to what I should do with finder and
Create exceptions from the session facades.

Should these be:

a) Thrown on to the clients

b) caught and EJBExceptions thrown on


if b) is true, how can the clients handle EJBExceptions?
These are runtime exceptions no?

Any advice for this issue would be really helpful, because
I'm still very confused!!

Thanks,
Brian


-----Original Message-----
From: jboss-user-admin@(protected)
[mailto:jboss-user-admin@(protected)
Hixson
Sent: 10 September 2003 17:55
To: jboss-user@(protected)
Subject: Re: [JBoss-user] exception handling advice

Hi Brian,
 You might want to look into the BusinessDelegate pattern. It would
fit between your struts actions and the session facade. In this level
you can wrap system level exceptions inside more application usable
exceptions.
 -M@

On Wednesday, September 10, 2003, at 09:34 AM, Brian McSweeney wrote:

> Hi all,
>
>  
>
> I’d like to know what the best practice on handling exceptions is.
>
> I’m using:
>
>  
>
>  
>
> Jsps---->struts actions  ----> session facades ----> entity beans
>
>  
>
> Imagine for a second that the session façade allows CRUD operations on
>
> myentity beans. For example say I have a entity bean called customer.
>
>  
>
> Now if I try to create a customer using a session façade method should

> I
>
> Throw a CreateException back to the struts action so I can tell the
> client
>
> I couldn’t create the customer?
>
>  
>
> I have read that both FinderExceptions and CreateExceptions in session
>
> Facades should just log it and throw new EJBException
>
>  
>
> [http://www-106.ibm.com/developerworks/java/library/j-ejbexcept.html ]
>
>  
>
> buthow can you give a meaningful error back to the client as to what
>
> happened? So should I catch finder and create exceptions in the struts
>
> actions?
>
>  
>
> I’m very confused. Perhaps someone can give me some advice
>
> Thanks,
>
> Brian
>
>  
>



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
JBoss-user@(protected)
https://lists.sourceforge.net/lists/listinfo/jboss-user



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
JBoss-user@(protected)
https://lists.sourceforge.net/lists/listinfo/jboss-user


©2008 junlu.com - Jax Systems, LLC, U.S.A.