droolsjbpm/drools — pull request #161 by mrietveld (2012-10-31 14:45:28+00:00)
Title: Local tx persistence

This is a pull request which implements local transaction based persistence for Drools(/jBPM).

There are separate pull-requests/changes necessary for both the
jbpm and droolsjbpm-integration projects.

Most of the documentation explaining what's going on can be found in the javadoc of the LocalTransactionManager class ([github link](https://github.com/mrietveld/drools/blob/local-tx-persistence/drools-persistence-jpa/src/main/java/org/drools/persistence/local/LocalTransactionManager.java)).

Once this pull request is merged, then there's a second step: implementing the following methods:
StatefulKnowledgeSession.startTransaction()
StatefulKnowledgeSession.endTransaction()

(Obviously, if there's a better name/class for these methods, that isn't an issue: please do suggest these.)

These methods will allow users to use local transactions "outside" of
the (Stateful)KnowledgeSession so that users can dictate when the
transaction commits.

Because local transactions do not have synchronization ("callback") points,
these methods are necessary in order to "trigger" them for local
transactions.