[jboss-jira] [JBoss JIRA] Updated: (JBMESSAGING-819) Use of stopping flag in DefaultClusteredPostOffice introduces race conditions
Tim Fox (JIRA)
jira-events at lists.jboss.org
Mon Apr 30 10:01:30 EDT 2007
[ http://jira.jboss.com/jira/browse/JBMESSAGING-819?page=all ]
Tim Fox updated JBMESSAGING-819:
--------------------------------
Fix Version/s: 1.2.1.CR1
(was: Unscheduled)
> 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
> Priority: Minor
> Fix For: 1.2.1.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: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list