Bug 803831 - Persistence fails when running multiple threads with exclusive EntityManager for each thread
Summary: Persistence fails when running multiple threads with exclusive EntityManager ...
Keywords:
Status: CLOSED DUPLICATE of bug 805899
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: jBPM 5
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: BRMS 5.3.0.GA
Assignee: Marco Rietveld
QA Contact: Jiri Svitak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-15 17:55 UTC by Jiri Svitak
Modified: 2016-09-20 05:04 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-11 11:04:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Stack trace (824.75 KB, text/plain)
2012-03-15 17:55 UTC, Jiri Svitak
no flags Details

Description Jiri Svitak 2012-03-15 17:55:36 UTC
Created attachment 570370 [details]
Stack trace

I have created a test which runs multiple threads in parallel. Each thread has its own ksession. Every thread uses its own EntityManager. Threads share the same database for persisting process instances, work items and session information.

If I use single entity manager which is shared by the threads, then everything is persisted fine.

I have attached error stack trace in file, because the stack trace is very long. This stack trace happened with MySQL database.

I have also tried local HSQL database, but the exception is a bit different and shorter.

I am working on a test case, it is available here
https://github.com/jsvitak/jbpm/blob/parallelProcessPersistence/jbpm-test/src/test/java/org/jbpm/persistence/ProcessMultiThreadPersistenceTest.java

But it is not finished and working yet. I am working on a pull request.

Comment 1 Marco Rietveld 2012-04-11 09:29:21 UTC
Jiri, 

It seems like this might be a duplicate of 805899. 

If this is not a duplicate, could you add some additional detail as to why the issue/cause here is different than in 805899? 

Thanks,
Marco

Comment 2 Marco Rietveld 2012-04-11 11:04:33 UTC
It turns out that 805899 covers this same issue, please see that issue for more information.

*** This bug has been marked as a duplicate of bug 805899 ***


Note You need to log in before you can comment on or make changes to this bug.