You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ao...@apache.org on 2017/12/15 12:52:20 UTC

[20/53] [abbrv] ambari git commit: AMBARI-22597. Jetty Session Timeout Is Overridden By Views Initialization. (mpapirkovskyy)

AMBARI-22597. Jetty Session Timeout Is Overridden By Views Initialization. (mpapirkovskyy)


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

Branch: refs/heads/branch-3.0-perf
Commit: cfb2321f8769bdc92a1c08ad354e604f104ac629
Parents: e973986
Author: Myroslav Papirkovskyi <mp...@hortonworks.com>
Authored: Tue Nov 21 17:26:06 2017 +0200
Committer: Myroslav Papirkovskyi <mp...@hortonworks.com>
Committed: Wed Dec 6 19:23:12 2017 +0200

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


http://git-wip-us.apache.org/repos/asf/ambari/blob/cfb2321f/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 863313b..64a4338 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
@@ -561,6 +561,9 @@ public class AmbariServer {
        */
       server.start();
 
+      //views initialization will reset inactive interval with default value, so we should set it after
+      configureMaxInactiveInterval();
+
       serverForAgent.start();
       LOG.info("********* Started Server **********");
 
@@ -851,10 +854,13 @@ public class AmbariServer {
     if (configs.getApiSSLAuthentication()) {
       sessionManager.getSessionCookieConfig().setSecure(true);
     }
+  }
 
+  protected void configureMaxInactiveInterval() {
     // each request that does not use AMBARISESSIONID will create a new
     // HashedSession in Jetty; these MUST be reaped after inactivity in order
     // to prevent a memory leak
+
     int sessionInactivityTimeout = configs.getHttpSessionInactiveTimeout();
     sessionManager.setMaxInactiveInterval(sessionInactivityTimeout);
   }