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