Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

aop rules engine

 
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.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • 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.
 
ranger
Posts: 17344
11
Mac IntelliJ IDE 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.
 
Then YOU must do the pig's work! Read this tiny ad. READ IT!
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!