The application already has non-aop based exception handling framework in place. Now there is a need to refactor it and thus exploring the usage of aop including its usage in try/catch blocks and the other two needs mentioned in my original post.
Hope to know your input.
posted 10 years ago
Also is there a way to implement Spring aop based rules (instead of using third party rules engine) to decide at the facade layer as what to do with different types of exceptions thrown by the different layers of the system - whether to log them/rethrow etc.
I am exploring ways to implement exception handling in my application - when to throw an exception and what to do with different types of exceptions.
And you need aop for this ? What about basic try/catch blocks ?
Actually using AOP as an exception handler/manager is a great solution. Usually there is a big debate on propogation of exceptions and how to handle them at different levels to the point of what does the user see displayed. An Exception handler at the AOP level can do all this in one place, with a simple method, and then all that tangled code that would have been in your app code is now removed, to make it even more maintainable, and dramatically decreasing your costs.
Could you give pointers to the examples/articles/books for the following using Spring aop:
1) Avoiding try catch blocks
2) Spring aop based exception handlers
3) how to implement xml conifguration of rules as what to do with different types of exceptions - log/rethrow certain exceptions based on business requirements.
Thanks in advance.
Then YOU must do the pig's work! Read this tiny ad. READ IT!