activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From martyntay...@apache.org
Subject [09/34] activemq-artemis git commit: ARTEMIS-831 avoid shutting down the server after interrupted threads on divert (copy and rename)
Date Tue, 01 Nov 2016 10:21:38 GMT
ARTEMIS-831 avoid shutting down the server after interrupted threads on
divert (copy and rename)

probably introduced at ARTEMIS-322


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/b4924ce7
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/b4924ce7
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/b4924ce7

Branch: refs/heads/ARTEMIS-780
Commit: b4924ce73b8d92ac9a6ae3faaabdefc5844a4a64
Parents: 10187d0
Author: Ravi Soni <rv.soni@hotmail.com>
Authored: Thu Oct 27 21:47:35 2016 -0400
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Fri Oct 28 16:28:57 2016 -0400

----------------------------------------------------------------------
 .../apache/activemq/artemis/core/io/AbstractSequentialFile.java | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b4924ce7/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFile.java
----------------------------------------------------------------------
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFile.java
b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFile.java
index 5665e57..0c6dcdf 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFile.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFile.java
@@ -19,6 +19,7 @@ package org.apache.activemq.artemis.core.io;
 import java.io.File;
 import java.io.IOException;
 import java.nio.ByteBuffer;
+import java.nio.channels.ClosedChannelException;
 import java.util.List;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.Executor;
@@ -117,6 +118,8 @@ public abstract class AbstractSequentialFile implements SequentialFile
{
          FileIOUtil.copyData(this, newFileName, buffer);
          newFileName.close();
          this.close();
+      } catch (ClosedChannelException e) {
+         throw e;
       } catch (IOException e) {
          factory.onIOError(new ActiveMQIOErrorException(e.getMessage(), e), e.getMessage(),
this);
          throw e;
@@ -140,6 +143,8 @@ public abstract class AbstractSequentialFile implements SequentialFile
{
    public final void renameTo(final String newFileName) throws IOException, InterruptedException,
ActiveMQException {
       try {
          close();
+      } catch (ClosedChannelException e) {
+         throw e;
       } catch (IOException e) {
          factory.onIOError(new ActiveMQIOErrorException(e.getMessage(), e), e.getMessage(),
this);
          throw e;


Mime
View raw message