You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Viral_Thakkar <Vi...@infosys.com> on 2004/06/16 12:56:14 UTC

exception handling

Hi All,

Please verify the below exception handling scenario.

Struts Action class --> Business Delegate --> EJB (Uses OR Mapping Top
link to talk to database) 

Also, we have a ServiceLocator class which is used to get the EJBHome
reference. 

There are three layers at which we need to handle the exception.

At EJB layer, at business delegate and at struts layer.

EJB layer (session bean) methods will throw the (Application) business
exceptions. 

At business delegate layer, application exceptions will be thrown by
methods, same as EJB methods.

At struts layer, in the Action class's execute(), we will catch all
these business exceptions. 

For Runtime exceptions, we will catch the ToplinkException (this extends
RuntimeException and this is root of all runtime exceptions) in ejb
methods and this catch block will throw SystemException (a checked
exception). 

Action will catch this SystemException.

Please provide your valuable inputs.

Also let me know where EJBException will come in picture?

Thanks in advance.

Viral 




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