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:
Setting to new, so that I can tell which bz's are modified ("ASSIGNED") and which aren't ("NEW").
Fixed with this commit: https://github.com/droolsjbpm/jbpm/commit/62a08aa851bdf0e92135e28597c802901842c063 Thanks again to Alessandro for the help!
Verified in 5.3.1.BRMS-P04