O'Reilly logo

Drools JBoss Rules 5.X Developer's Guide by Michal Bali

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Validation using stateful session

Our implementation of the validation service from Chapter 3, Validating, is working seamlessly, but it might be doing more work than it needs to. The state of the session isn't kept and so all rules have to be processed every time. Imagine a web application where a user logs in to his/her bank account and wants to do a couple of changes. Every change needs to leave the system in a consistent state. The validation must run as part of every request. However, with the validation implementation that we have, all objects will have to be inserted into a new stateless knowledge session over and over again, which is unnecessary. With a stateful session, we just need to insert all objects once and then simply update only ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required