Repository: ambari Updated Branches: refs/heads/trunk e973986e2 -> cfb2321f8
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/trunk Commit: cfb2321f8769bdc92a1c08ad354e604f104ac629 Parents: e973986 Author: Myroslav Papirkovskyi <[email protected]> Authored: Tue Nov 21 17:26:06 2017 +0200 Committer: Myroslav Papirkovskyi <[email protected]> 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); }
