mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-5620 - avoid potential deadlock on shutdown - waiting on connections to stop before stopping the pa would be an alternative but may block for ever, auto rollback ensures there is no need
This commit is contained in:
parent
4f57744934
commit
260e28ecad
|
@ -463,7 +463,8 @@ public class Journal {
|
|||
return dataFile.getNext();
|
||||
}
|
||||
|
||||
public synchronized void close() throws IOException {
|
||||
public void close() throws IOException {
|
||||
synchronized (this) {
|
||||
if (!started) {
|
||||
return;
|
||||
}
|
||||
|
@ -471,13 +472,17 @@ public class Journal {
|
|||
this.timer.cancel();
|
||||
}
|
||||
accessorPool.close();
|
||||
}
|
||||
// the appender can be calling back to to the journal blocking a close AMQ-5620
|
||||
appender.close();
|
||||
synchronized (this) {
|
||||
fileMap.clear();
|
||||
fileByFileMap.clear();
|
||||
dataFiles.clear();
|
||||
lastAppendLocation.set(null);
|
||||
started = false;
|
||||
}
|
||||
}
|
||||
|
||||
protected synchronized void cleanup() {
|
||||
if (accessorPool != null) {
|
||||
|
|
Loading…
Reference in New Issue