Recently I wrote an article on A J2EE exception handling framework, a new strategy of handling exceptions in J2EE applications which got published on ONJava. It talks about an exception handling strategy which could be applied anywhere seamlessly in Java world. The baseline has been taken as Struts presentation framework, but the strategy and framework can be applied anywhere.
Vishal Deshpande says
Hello Shrikant,
I recently came across your excellent Exception Handling Framework on OReilly and went through the source code too. The article was found under the Best Practices category and I really thank you for putting that together.
I have a quick question regarding the usability of your framework. I would like to use and adapt this framework for an application that I am building and wanted to check with you if it was all right to do so.
In particular, I am using Spring framework and would like to configure the individual checked exception behavior by utilizing Spring xml bean configuration thereby avoiding the use of the XML parsers for parsing exceptionInfo.xml and creating and caching the ExceptionInfoDTO objects as Spring would do that for you.
The spring xml file would look something like
This would create two instances of ExceptionInfoDTO with behavior applied from the bean config file. These instances would be available through the Spring ApplicationContext and can be extracted using the bean id in the betBean method.
Let me know your thoughts on leveraging Spring’s ApplicationContext bean wiring capability.
Also, using Spring AOP, one can further abstract exception handling by weaving @Throws aspect around the modules. What are your thoughts on using aspect oriented exception handling?
Thanks for your suggestion,
— Vishal