optimistic locking test
-----------------------
Key: JBPM-2079
URL:
https://jira.jboss.org/jira/browse/JBPM-2079
Project: JBoss jBPM
Issue Type: Task
Security Level: Public (Everyone can see)
Reporter: Tom Baeyens
Assignee: Alejandro Guizar
Fix For: jBPM 4.0.0.Beta1
create a minimal test that produces an optimistic locking failure.
I believe the simplest way to test this is something like this:
Start a process instance with 2 wait states and put it in the first wait state.
EnvironmentFactory environmentFactory = get it from some configuration file
Environment environment1 = environmentFactory.openEnvironment();
Session session1 = environment1.get(Session.class);
ExecutionImpl processInstance1 = session1.load(ExecutionImpl.class, processInstanceDbid);
Environment environment2 = environmentFactory.openEnvironment();
Session session2 = environment2.get(Session.class);
ExecutionImpl processInstance2 = session2.load(ExecutionImpl.class, processInstanceDbid);
processInstance1.signal();
processInstance2.signal();
environment2.close();
environment1.close();
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira