]
Tim Fox commented on JBMESSAGING-819:
-------------------------------------
There is a workaround for this already in place.
Use of stopping flag in DefaultClusteredPostOffice introduces race
conditions
-----------------------------------------------------------------------------
Key: JBMESSAGING-819
URL:
http://jira.jboss.com/jira/browse/JBMESSAGING-819
Project: JBoss Messaging
Issue Type: Bug
Affects Versions: 1.2.0.Beta2
Reporter: Tim Fox
Assigned To: Tim Fox
Fix For: 1.2.0.CR1
Using a stopping flag is not a good approach and introduces a race condition the code can
check stopping and find it to be false, then the service can stop, setting stopping to
true then actually stopping the post office, then the same thread that checked stopping
continues and performs its action only to find the service stopped.
Should use a read-write lock instead.
One way to minimise the chance of the race happening is to sleep for a little while after
setting stopping to true before actually stopping the service (see below)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: