[1/2] activemq-artemis git commit: This closes #2195

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[1/2] activemq-artemis git commit: This closes #2195

clebertsuconic-2
Repository: activemq-artemis
Updated Branches:
  refs/heads/master 99bc916fd -> bdbbcc723


This closes #2195


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

Branch: refs/heads/master
Commit: bdbbcc723d2716a059ab9849c8a6ca9698f4435a
Parents: 99bc916 06f6892
Author: Clebert Suconic <[hidden email]>
Authored: Tue Jul 31 14:22:58 2018 -0400
Committer: Clebert Suconic <[hidden email]>
Committed: Tue Jul 31 14:22:58 2018 -0400

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


Reply | Threaded
Open this post in threaded view
|

[2/2] activemq-artemis git commit: ARTEMIS-1992 Make JDBC File Lock map thread safe

clebertsuconic-2
ARTEMIS-1992 Make JDBC File Lock map thread safe


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

Branch: refs/heads/master
Commit: 06f689245427e9584410d88ccbc99f44bad4cc01
Parents: 99bc916
Author: Martyn Taylor <[hidden email]>
Authored: Thu Jul 26 16:37:08 2018 +0100
Committer: Clebert Suconic <[hidden email]>
Committed: Tue Jul 31 14:22:58 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/06f68924/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,