ref #8848 switching from thread local to global secutity context holder strategy
authorAndreas Kohlbecker <a.kohlbecker@bgbm.org>
Fri, 14 Feb 2020 11:55:04 +0000 (12:55 +0100)
committerAndreas Kohlbecker <a.kohlbecker@bgbm.org>
Fri, 14 Feb 2020 11:57:45 +0000 (12:57 +0100)
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmApplicationRemoteConfiguration.java

index 515abdbeb35749815cf6c0003780e85e4e3f130f..77bcb1e8bff8e425d72fb5dbd40f4009189e4dd2 100644 (file)
@@ -150,6 +150,12 @@ public class CdmApplicationRemoteConfiguration implements ICdmRepository, Applic
 \r
     private ICachedCommonService cachedCommonService;\r
 \r
+    static {\r
+        // The Taxeditor is multithreaded, the same authentication should be used\r
+        // in all threads\r
+        SecurityContextHolder.setStrategyName(SecurityContextHolder.MODE_GLOBAL);\r
+    }\r
+\r
     public CdmApplicationRemoteConfiguration() {}\r
 \r
     public CdmApplicationRemoteConfiguration(ICdmRemoteSource remoteSource) {\r