• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

aop rules engine

 
Joe Robles
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am new to rules engine world. 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.

I want to explore if Spring aop can be used in creating a simple rules engine or is there a need to use third party rules engines like groovy/drools with spring aop?

I am sure many of you must have already used some of the approaches for this same purpose. Thus any pointers are highly appreciated.

Thanks in advance for your valuable time and input.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
Joe Robles
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Thanks.
 
Joe Robles
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Thanks.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Christophe Verré wrote:
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.

Mark
 
Joe Robles
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Thanks for the prompt reply.

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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic