ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tbeerbo...@apache.org
Subject ambari git commit: AMBARI-8202 - Views: Instance Data API doesn't work in threads (tbeerbower)
Date Fri, 07 Nov 2014 18:13:18 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 4f2eefeae -> 0cdde042b


AMBARI-8202 - Views: Instance Data API doesn't work in threads (tbeerbower)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0cdde042
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0cdde042
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0cdde042

Branch: refs/heads/trunk
Commit: 0cdde042b4a9018c2a70fd237a821eed52fbcb37
Parents: 4f2eefe
Author: tbeerbower <tbeerbower@hortonworks.com>
Authored: Fri Nov 7 13:12:42 2014 -0500
Committer: tbeerbower <tbeerbower@hortonworks.com>
Committed: Fri Nov 7 13:13:10 2014 -0500

----------------------------------------------------------------------
 .../java/org/apache/ambari/server/controller/AmbariServer.java    | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0cdde042/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
index 33bb5af..224cce4 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
@@ -113,6 +113,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
+import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.security.crypto.password.PasswordEncoder;
 import org.springframework.web.context.WebApplicationContext;
 import org.springframework.web.context.request.RequestContextListener;
@@ -343,6 +344,8 @@ public class AmbariServer {
       root.addServlet(sh, "/api/v1/*");
       sh.setInitOrder(2);
 
+      SecurityContextHolder.setStrategyName(SecurityContextHolder.MODE_INHERITABLETHREADLOCAL);
+
       viewRegistry.readViewArchives();
 
       handlerList.addHandler(root);


Mime
View raw message