Persistence and transactions
Drools is usually used in situations where persisting its contents is somewhat impractical. Either we want to execute rules as quickly as possible, and don't want the overhead of having to persist on a database, or we want to keep as much information as possible from the session in memory, so we can reuse it rapidly. The situation with jBPM is a bit different, because we are going to need to use the Kie Session to keep track of the immediate (automatic) steps of a process; then we might have long wait periods while a task is completed or until a signal is received. This scenario implies a sizable need to release resources when not being used; for that, the Kie Session provides persistence mechanisms.
In the following sub sections, we're going to see how Drools and jBPM provide a series of storing mechanisms to release resources from memory and place them into persistence. We will explore:
- Different persistence configurations we can use
- How transactions...