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 ...

Get Drools JBoss Rules 5.X Developer's Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.