[
https://issues.jboss.org/browse/JBESB-3862?page=com.atlassian.jira.plugin...
]
RH Bugzilla Integration commented on JBESB-3862:
------------------------------------------------
Marek Baluch <mbaluch(a)redhat.com> made a comment on [bug
850891|https://bugzilla.redhat.com/show_bug.cgi?id=850891]
The race condition between handlers still occurs. See attached server.log.
The stack in the server log can be easily reproduced using the following steps.
1) deploy the attached esb application
2) invoke it a few times
{code}
Message esbMessage = MessageFactory.getInstance().getMessage();
esbMessage.getBody().add("Empty");
new ServiceInvoker("FirstServiceESB",
"StartListener").deliverSync(esbMessage, 5000L);
{code}
3) go to the console, log in as krisv:krisv and attempt to complete one of the tasks.
AbstractBpm5Action is registering handlers too freely
-----------------------------------------------------
Key: JBESB-3862
URL:
https://issues.jboss.org/browse/JBESB-3862
Project: JBoss ESB
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Process flow
Affects Versions: 4.11
Reporter: Tom Cunningham
Assignee: Tom Cunningham
Fix For: 4.11 CP1
Explanation from Rick Wagner's BZ :
AbstractBpm5Action is doing some handler registration for *each* process instance start
and service callback:
....
ksession.getWorkItemManager().registerWorkItemHandler("JBossESB", esbhandler);
ksession.getWorkItemManager().registerWorkItemHandler("ESBAction",
actionhandler);
ksession.getWorkItemManager().registerWorkItemHandler("Human Task", khandler);
'khandler' in particular is an instance of CommandBasedHornetQWSHumanTaskHandler
by default.
So when the user goes to close a task, all those handlers fire (JPA trips up, too):
012-08-22 12:32:06,006 INFO [STDOUT] (Thread-32) Notification of completed task 132
2012-08-22 12:32:06,017 INFO [STDOUT] (Thread-34) Notification of completed task 132
2012-08-22 12:32:06,025 INFO [STDOUT] (Thread-35) Notification of completed task 132
2012-08-22 12:32:06,033 INFO [STDOUT] (Thread-36) Notification of completed task 132
2012-08-22 12:32:06,042 INFO [STDOUT] (Thread-37) Notification of completed task 132
2012-08-22 12:32:06,049 INFO [STDOUT] (Thread-37) Notification of completed task 132
2012-08-22 12:32:06,056 INFO [STDOUT] (Thread-38) Notification of completed task 132
2012-08-22 12:32:06,063 INFO [STDOUT] (Thread-39) Notification of completed task 132
2012-08-22 12:32:06,069 INFO [STDOUT] (Thread-40) Notification of completed task 132
2012-08-22 12:32:06,076 INFO [STDOUT] (Thread-41) Notification of completed task 132
2012-08-22 12:32:06,082 INFO [STDOUT] (Thread-41) Notification of completed task 132
2012-08-22 12:32:05,985 INFO [STDOUT] (Thread-31) Notification of completed task 132
2012-08-22 12:32:05,998 ERROR [org.hibernate.event.def.AbstractFlushingEventListener]
(Thread-31) Could not synchronize database state with session
org.hibernate.StaleObjectStateException: Row was updated or deleted by another
transaction (or unsaved-value mapping was incorrect):
[org.jbpm.persistence.processinstance.ProcessInstanceInfo#44]
at
org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:1782)
.......
at
org.jbpm.task.service.hornetq.CommandBasedHornetQWSHumanTaskHandler$GetCompletedTaskResponseHandler.execute(CommandBasedHornetQWSHumanTaskHandler.java:273)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira