Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4244304
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:41:25+00:00 2026-05-21T03:41:25+00:00

My enterprise application is currently Running on Weblogic 10.3.4, Java 1.6 and Spring 2.0.8.

  • 0

My enterprise application is currently Running on Weblogic 10.3.4, Java 1.6 and Spring 2.0.8. It’s a recent upgrade hence Spring is yet to be updated and some of the java code base is still in old 1.4 style.

At the moment we use a propriatory rules engine to run our business rules. However, this is overkill as we use none of the inference engine functionality and we can no longer justify the license costs. The plan is to write a database driven rules engine.

Each form request will have any number of rules associated with it, which wiull be configured using a few basic database tables.

My design so far is that each rule defined in the database will map via Spring to a Singleton Stateless Spring bean. Given a form state each rule will return a Result respose object. See code snippet below:

 //get List of rules for form from database
 List<RuleConfiguration>  rules = RulesService.getRulesForFormRuleset(formType, filingMethod, rsName, document);

    IssueDocument issues = new IssueDocumentImpl();

     for (RuleConfiguration ruleConfig : rules) {


         //create a rule instance from the Spring Bean Factory
         Rule rule = (Rule) beanFactory.getBean(ruleConfig.getRule().getRuleBeanName());
         RulesIssue issue = rule.runRule(document, ruleConfig);

            if (issue != null)  {  //Issue has been populated rule must have fired
                issues.addNewIssue(issue);
            }
     }

    return issues;

Does this sound like a sensible solution? I was keen to implement a “light-touch” solution so steered clear of EJB as there are over 500 rules that will eventually have to be written. My main concern is that as these are all singletons and there will be a heavy demand on my “rules engine” do I need to consider some sort of bean pooling? Any other feedback would be most welcome. Rip me to shreds if you like – I can take it!

Many Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T03:41:25+00:00Added an answer on May 21, 2026 at 3:41 am

    Clearly there are two gross areas of work to do in this kind of thing.

    The first is to identify the rules to fire, and the second is to actually execute them.

    Depending on your filtering and the dynamism, the rule queries can likely be readily memoized, so likely the cost of the lookup will approach zero. 500 rules isn’t really a lot, when you think about it.

    Next, is actual execution. If all of your things are singletons, then you’ll need to be concerned about singleton startup, thread safety, etc.

    Basically, just make sure each of your rules has a lifecycle. “start” “run” “stop”. If it’s a true singleton that needs some state from run to run, then the start and stop methods will likely have logic in them. If it’s just a bit of logic to run on the inputs, then there’s probably no need to have start and stop (they can be empty methods), or for it to be a singleton at all, so just make a new instance, fire it, and throw it away.

    You don’t mention what a “rule” is in terms of logic. They can easily be simple Java classes that follow this lifecycle. Add a @SingeletonRule annotation, or implement isSingleton, whatever.

    Really, at this level there’s little rocket science to this kind of system. The magic is mostly in the meta data and the actual creating of the list of rules for execution.

    Simple rule systems are simple.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.