title: Session data is lost before session time out if the appilcation goes in ideal state
body: <p>I am using spring security 3.1.1 and mybatis 3 ,Session data is lost before session time out if the application goes in ideal state and the user behaves as an anonymous user after that </p>
  
  <p>Please help thanks in advance</p>
  
  <p>*<strong><em>spring security file for reference</em>*</strong></p>
  
  <pre><code>&lt;beans:beans xmlns="http://www.springframework.org/schema/security"
               xmlns:beans="http://www.springframework.org/schema/beans" 
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://www.springframework.org/schema/beans
      http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
      http://www.springframework.org/schema/security
      http://www.springframework.org/schema/security/spring-security-3.1.xsd"&gt;    
      &lt;http auto-config="false" use-expressions="true" &gt;
          &lt;intercept-url pattern="/jsp/home*" access="hasAnyRole('ROLE_GUEST','ROLE_ADMIN','ROLE_SUPPORT')" /&gt;
          &lt;intercept-url pattern="/jsp/search*" access="hasAnyRole('ROLE_GUEST','ROLE_ADMIN','ROLE_SUPPORT')" /&gt;
          &lt;intercept-url pattern="/jsp/errorSearch*" access="hasAnyRole('ROLE_GUEST','ROLE_ADMIN','ROLE_SUPPORT')"/&gt;
          &lt;form-login login-page="/jsp/login.htm" default-target-url="/jsp/home.htm" login-processing-url="/jsp/j_spring_security_check"
                      authentication-failure-url="/jsp/login.htm?error=true"/&gt;            
          &lt;logout logout-url="/jsp/j_spring_security_logout" logout-success-url="/jsp/login.htm" delete-cookies="JSESSIONID"/&gt;
          &lt;access-denied-handler error-page="/jsp/accessdenied.htm"/&gt;
          &lt;session-management session-authentication-error-url="/loginFailed" session-fixation-protection="migrateSession"&gt; 
              &lt;concurrency-control expired-url="/loginFailed" error-if-maximum-exceeded="true" max-sessions="1"/&gt;
          &lt;/session-management&gt;
      &lt;/http&gt;
      &lt;beans:bean id="ldapActiveDirectoryAuthProvider" class="org.springframework.security.ldap.authentication.ad.ActiveDirectoryLdapAuthenticationProvider"&gt;
          &lt;beans:constructor-arg value="homeoffice.test.com" /&gt;
          &lt;beans:constructor-arg value="ldap://honts0102.homeoffice.test.com:1568" /&gt;
          &lt;beans:property name="useAuthenticationRequestCredentials" value="true" /&gt;
          &lt;beans:property name="convertSubErrorCodesToExceptions" value="true" /&gt;
          &lt;beans:property name="userDetailsContextMapper" ref="dashboardUserDetailsContextMapper"/&gt;
      &lt;/beans:bean&gt;
      &lt;beans:bean id="dashboardUserDetailsContextMapper" class="com.test.dashboard.security.UserDetailsContextMapperImpl"/&gt;
       &lt;authentication-manager&gt;
             &lt;authentication-provider ref="ldapActiveDirectoryAuthProvider" /&gt;
       &lt;/authentication-manager&gt;
  &lt;/beans:beans&gt;
  </code></pre>