Book Image

Mastering jBPM6

By : Simone Fiorini, Arun V Gopalakrishnan
Book Image

Mastering jBPM6

By: Simone Fiorini, Arun V Gopalakrishnan

Overview of this book

Table of Contents (18 chapters)
Mastering jBPM6
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Persistence and transactions


The default persistence mechanism of the jBPM engine is based on the JPA 2/Hibernate implementation. Each engine operation (start process, start task, complete task, and so on) is run inside the scope of a transaction. TransactionInterceptor demarcates each command execution and eventually, depending on the transaction management used (Container Managed Transactions (CMT) or UserTransaction Bean Managed Transactions (BMT)), enlists the EntityManager engine in the ongoing transaction. We have seen how both session and task persistence works through CommandService and the interceptor architecture.

The default engine persistence configuration boils down to the engine persistence unit (defined in a persistence.xml file configuration) and, usually, to a JTA datasource definition at the application server level. jBPM imposes no constraints on the number of entity managers defined; you can obviously have a number of persistence units defined in your application and make...