session timeout is not in time
nimo22 Sep 14, 2012 5:44 AMIn web.xml I declared a session timeout of 1 minute:
<session-config>
<session-timeout>1</session-timeout>
</session-config>
When logging my session creation and my destruction by a @WebListener (ServletListener), I get this log:
11:22:18,105 INFO [bean.MyServletListener] (http--0.0.0.0-8080-1) HttpSessionEvent: session created !
11:22:18,106 INFO [bean.MyServletListener] (http--0.0.0.0-8080-1) session org.apache.catalina.session.StandardSessionFacade@32584a30
11:22:18,106 INFO [bean.MyServletListener] (http--0.0.0.0-8080-1) session.getMaxInactiveInterval 60
11:22:18,107 INFO [bean.MyServletListener] (http--0.0.0.0-8080-1) session.isNew true
11:22:18,108 INFO [bean.MyServletListener] (http--0.0.0.0-8080-1) session.getCreationTime():11:22:18 a.m.
11:22:18,111 INFO [bean.Test] (http--0.0.0.0-8080-1) session org.apache.catalina.session.StandardSessionFacade@32584a30
11:23:36,438 INFO [bean.MyServletListener] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) HttpSessionEvent: session destroyed !
11:23:36,440 INFO [bean.MyServletListener] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) session org.apache.catalina.session.StandardSessionFacade@32584a30
11:23:36,442 INFO [bean.MyServletListener] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) session.getMaxInactiveInterval 60
11:23:36,443 INFO [bean.MyServletListener] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) session.isNew false
11:23:36,444 INFO [bean.MyServletListener] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) session.getCreationTime(): 11:22:18 a.m.
11:23:36,446 INFO [bean.MyServletListener] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) session destroyTime: 11:23:36 a.m.
You see, it is not exactly one minute (It is not matter what time I set - the session timeout occurs always later than my defined timeout.)
Between the logs, there is absolutely no user interaction, so getMaxInactiveInterval is appropriate.
Is that normal, that the session timeout happend a while after one minute?
I do not know, if jboss does set any other timeouts in background. (However, I setup hornetq, I do not know, if this is the reason.)
Does anyone know why such things can occur?
I did remeber in jboss 6 the session timeout is occured exactly at time!