[ https://issues.apache.org/jira/browse/AMQ-6086?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15056268#comment-15056268 ]
Gary Tully commented on AMQ-6086: --------------------------------- having some sort of stack of started components is needed here. Pushing (start) aborting if popping has started. A blocking component, like a persistence adapter that will block on a lock acquire - would need to push early and respond to a stop during eventual blocking. This implies some symmetry between start/stop which makes sense and some consistency in applying the service pattern. Something to keep in mind for the future. > Broker stop and start are not at all thread safe - we can do better > ------------------------------------------------------------------- > > Key: AMQ-6086 > URL: https://issues.apache.org/jira/browse/AMQ-6086 > Project: ActiveMQ > Issue Type: Bug > Components: Broker > Affects Versions: 5.13.0 > Reporter: Gary Tully > Assignee: Gary Tully > Fix For: 5.14.0 > > > If one thread starts a broker and a second tries to stop we can get in a > mess. Particularly if there is blocking or locking in the mix. In some cases > we are ok but there is no determinism. > In a simple case, the stop can complete before the start gets going at all > and we miss the stop, leaving a dangling broker. -- This message was sent by Atlassian JIRA (v6.3.4#6332)