Bug 990315 - Concurrent requests to get tasks from Business Central throws Exceptions
Concurrent requests to get tasks from Business Central throws Exceptions
Status: VERIFIED
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: jBPM Console (Show other bugs)
BRMS 5.3.1
Unspecified Unspecified
unspecified Severity unspecified
: GA
: ---
Assigned To: Shelly McGowan
Marek Baluch
:
Depends On:
Blocks: 986451
  Show dependency treegraph
 
Reported: 2013-07-30 17:40 EDT by Alessandro Lazarotti
Modified: 2016-09-20 01:09 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alessandro Lazarotti 2013-07-30 17:40:05 EDT
Description of problem:
Case multiple requests are done by REST to get a task, repetead HornetQ queues could be created throwing exceptions like:

java.lang.IllegalStateException: Binding already exists LocalQueueBinding [address=org.jbpm.integration.console.forms.TaskFormDispatcher0, queue=QueueImpl[name=org.jbpm.integration.console.forms.TaskFormDispatcher0, postOffice=PostOfficeImpl [server=HornetQServerImpl::serverUUID=453e8938-e7d6-11e2-b4fe-e4ce8f262808]]@38e5c979, filter=null, name=org.jbpm.integration.console.forms.TaskFormDispatcher0, clusterName=org.jbpm.integration.console.forms.TaskFormDispatcher0453e8938-e7d6-11e2-b4fe-e4ce8f262808]
	at org.hornetq.core.postoffice.impl.SimpleAddressManager.addBinding(SimpleAddressManager.java:59)
	at org.hornetq.core.postoffice.impl.WildcardAddressManager.addBinding(WildcardAddressManager.java:98)
	at org.hornetq.core.postoffice.impl.PostOfficeImpl.addBinding(PostOfficeImpl.java:451)
	at org.hornetq.core.server.impl.HornetQServerImpl.createQueue(HornetQServerImpl.java:1715)

... due race conditions at org.jbpm.integration.console.TaskManagement.connect() and org.jbpm.integration.console.forms.TaskFormDispatcher.connect(). 

Synchronizing these methods should fix the issue.


Steps to Reproduce:
- Performing multiple concurrent requests to /business-central-server/rs/form/task/{id}/render or by /business-central-server/rs/tasks/{idRef}

Actual results:
java.lang.IllegalStateException: Binding already exists 

Expected results:
No exception and get the form or the task requested

Additional info:
Comment 1 Marco Rietveld 2013-08-06 18:39:37 EDT
Setting to new, so that I can tell which bz's are modified ("ASSIGNED") and which aren't ("NEW").
Comment 5 Marco Rietveld 2013-08-08 05:02:46 EDT
Fixed with this commit: 

https://github.com/droolsjbpm/jbpm/commit/62a08aa851bdf0e92135e28597c802901842c063

Thanks again to Alessandro for the help!
Comment 6 Tomas Schlosser 2013-09-23 04:00:49 EDT
Verified in 5.3.1.BRMS-P04

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