문서의 이전 판입니다!


Session Timeout 설정하기

  1. The session timeout hierarchy in JBoss EAP is (from lowest to highest precedence):
  • org.apache.catalina.session.Manager.maxInactiveInterval (default 60 seconds)
  • Set globally in JBossWeb's web.xml (default 30 minutes):

For EAP 4.x, $JBOSS_HOME/server/$PROFILE/deploy/jboss-web.deployer/conf/web.xml
For EAP 5.x, $JBOSS_HOME/server/$PROFILE/deployers/jbossweb.deployer/web.xml

  • Set in the web application's web.xml: WEB-INF/web.xml
  • Dynamically set in code by javax.servlet.http.HttpSession#setMaxInactiveInterval(int)
  1. In other words, if the session timeout is set programmatically in the web application via javax.servlet.http.HttpSession#setMaxInactiveInterval(int). This takes precedence over the timeout set in the webapps web.xml, which takes precedence over configured timeout in JBossWeb's gloabl web.xml.
  1. In web.xml, the configuration format is:
<session-config>
  <session-timeout>30</session-timeout>
</session-config>

For EAP 6 up to 6.3 it is not possible to set session timeout globally because there is no global web.xml and there is no setting in the web subsystem currently.
The default Http session timeout in EAP 6 is 30 minutes and it is hard-coded at the container level.
If there is a need to set the session timeout, this should be done in the web application's web.xml.

Starting from EAP 6.4 you can modify the default session timeout by changing the default-session-timeout attribute of the web subsystem.
Setting it 15 minutes for example:

/subsystem=web:write-attribute(name=default-session-timeout,value=15)

result in xml:

        <subsystem xmlns="urn:jboss:domain:web:2.2" default-virtual-server="default-host" native="false" default-session-timeout="15">
...
        </subsystem>
로그인하면 댓글을 남길 수 있습니다.
  • session_timeout_설정하기.1458995247.txt.gz
  • 마지막으로 수정됨: 2016/03/26 12:27
  • 저자 koov