droolsjbpm/drools — pull request #139 by mswiderski (2012-08-27 17:53:43+00:00)
Title: BZ848855 - Transaction rollback failure after concurrent access: no tran...

...saction

Ensure that persistence context is cleared after transaction completion to avoid cached entities on hibernate session level which will cause org.hibernate.StaleObjectStateException.
By default when EntityManagerFactory is created using Persistence.createEntityManagerFactory it will create it with extended persistence context type which means that entities will be shared between transactions and in case there are more processes sharing same data base they will get org.hibernate.StaleObjectStateException on following operation:
- getProcessInstance - StaleObjectStateException on ProcessInstanceInfo entity
- startProcess - StaleObjectStateException - on SessionInfo entity