Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 990315 - Concurrent requests to get tasks from Business Central throws Exceptions
Summary: Concurrent requests to get tasks from Business Central throws Exceptions
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: jBPM Console
Version: BRMS 5.3.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: GA
: ---
Assignee: Shelly McGowan
QA Contact: Marek Baluch
Depends On:
Blocks: 986451
TreeView+ depends on / blocked
Reported: 2013-07-30 21:40 UTC by Alessandro Lazarotti
Modified: 2018-12-02 15:56 UTC (History)
2 users (show)

Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed:
Type: Bug

Attachments (Terms of Use)

Description Alessandro Lazarotti 2013-07-30 21:40:05 UTC
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(
	at org.hornetq.core.postoffice.impl.WildcardAddressManager.addBinding(
	at org.hornetq.core.postoffice.impl.PostOfficeImpl.addBinding(
	at org.hornetq.core.server.impl.HornetQServerImpl.createQueue(

... 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 22:39:37 UTC
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 09:02:46 UTC
Fixed with this commit:

Thanks again to Alessandro for the help!

Comment 6 Tomas Schlosser 2013-09-23 08:00:49 UTC
Verified in 5.3.1.BRMS-P04

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