In your project, you might use hibernate for your persistence. Combining your persistent classes with the jBPM persistent classes is optional. There are two major benefits when combining your hibernate persistence with jBPM's hibernate persistence:
First, session, connection and transaction management become easier. By combining jBPM and your persistence into one hibernate session factory, there is one hibernate session, one jdbc connection that handles both yours and jBPM's persistence. So automatically the jBPM updates are in the same transaction as the updates to your own domain model. This can eliminates the need for using a transaction manager.
Secondly, this enable you to drop your hibernatable persistent object in to the process variables without any further hassle.
The easiest way
to integrate your persistent classes with the jBPM persistent classes is by
creating one central hibernate.cfg.xml. You can take the jBPM
hibernate.cfg.xml
as a starting point and
add references to your own hibernate mapping files in there.