Bug 990315 - Concurrent requests to get tasks from Business Central throws Exceptions
Summary: Concurrent requests to get tasks from Business Central throws Exceptions
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: jBPM Console
Version: BRMS 5.3.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: GA
: ---
Assignee: Kris Verlaenen
QA Contact: Marek Baluch
URL:
Whiteboard:
Depends On:
Blocks: 986451
TreeView+ depends on / blocked
 
Reported: 2013-07-30 21:40 UTC by Alessandro Lazarotti
Modified: 2022-05-31 22:28 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


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(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 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: 

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

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.