Use ConcurrentHashMap instead of Collections.synchronizedMap(new HashMap())
---------------------------------------------------------------------------

                 Key: GERONIMO-4987
                 URL: https://issues.apache.org/jira/browse/GERONIMO-4987
             Project: Geronimo
          Issue Type: Improvement
      Security Level: public (Regular issues)
    Affects Versions: 2.1.4
            Reporter: Jack Cai
            Priority: Trivial
             Fix For: 3.0


It might be better to use ConcurrentHashmap in below files.

./plugins/console/console-filter/src/main/java/org/apache/geronimo/console/filter/XSRFHandler.java:
    private Map<String, String> sessionMap = Collections.synchronizedMap(new 
HashMap<String, String>());
./framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/EncryptionManager.java:
    private static final Map<String, Encryption> ENCRYPTORS = 
Collections.synchronizedMap(new HashMap<String, Encryption>());
./framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java:
        asyncKeys = Collections.synchronizedMap(new HashMap<Object, 
DownloadResults>());
./framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java:
        asyncKeys = Collections.synchronizedMap(new HashMap<Object, 
DownloadResults>());
./framework/modules/geronimo-plugin/src/main/java/org/apache/geronimo/system/plugin/PluginInstallerGBean.java:
        asyncKeys = Collections.synchronizedMap(new HashMap<Object, 
DownloadResults>());
./framework/modules/geronimo-jmx-remoting/src/main/java/org/apache/geronimo/jmxremoting/Authenticator.java:
    private Map<String, LoginContext> contextMap = 
Collections.synchronizedMap(new HashMap<String, LoginContext>());
./framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/ContextManager.java:
    private static Map<SubjectId, Subject> subjectIds =  
Collections.synchronizedMap(new HashMap<SubjectId, Subject>());




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to