Repository: activemq-artemis
Updated Branches:
  refs/heads/2.6.x 318fc6f44 -> 548459f4c


ARTEMIS-1992 Make JDBC File Lock map thread safe

(cherry picked from commit 06f689245427e9584410d88ccbc99f44bad4cc01)


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

Branch: refs/heads/2.6.x
Commit: 7873790ddd21e7699195f41c1203a54b14936f3c
Parents: 318fc6f
Author: Martyn Taylor <[email protected]>
Authored: Thu Jul 26 16:37:08 2018 +0100
Committer: Clebert Suconic <[email protected]>
Committed: Tue Aug 7 15:26:18 2018 -0400

----------------------------------------------------------------------
 .../artemis/jdbc/store/file/JDBCSequentialFileFactory.java      | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7873790d/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactory.java
----------------------------------------------------------------------
diff --git 
a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactory.java
 
b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactory.java
index 862bdbe..8f520f2 100644
--- 
a/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactory.java
+++ 
b/artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/file/JDBCSequentialFileFactory.java
@@ -21,10 +21,10 @@ import java.io.File;
 import java.nio.ByteBuffer;
 import java.sql.Connection;
 import java.sql.SQLException;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.Executor;
 
 import org.apache.activemq.artemis.core.io.IOCriticalErrorListener;
@@ -47,7 +47,7 @@ public class JDBCSequentialFileFactory implements 
SequentialFileFactory, ActiveM
 
    private final Executor executor;
 
-   private final Map<String, Object> fileLocks = new HashMap<>();
+   private final Map<String, Object> fileLocks = new ConcurrentHashMap<>();
 
    private JDBCSequentialFileFactoryDriver dbDriver;
 
@@ -66,7 +66,6 @@ public class JDBCSequentialFileFactory implements 
SequentialFileFactory, ActiveM
       } catch (SQLException e) {
          criticalErrorListener.onIOException(e, "Failed to start JDBC Driver", 
null);
       }
-
    }
 
    public JDBCSequentialFileFactory(final String connectionUrl,

Reply via email to