title: Can we put condition before session timeout in spring?
body: <p>I have defined below rules for handling user session.</p>
  
  <ul>
  <li>When user logs in sessioncreate() of HttpSessionListener will be called and will set user status as online in database.</li>
  <li>When user logs out sessiondestroy() of HttpSessionListener will be called and will set user status as offline in database..</li>
  <li>When user closes the browser/tab, make AJAX call on browser unload/some_other event to destroy the session.</li>
  <li>Since we can not rely on browser events completely, use session_timeout on server side also. On Session timeout event, first make validation call from server to client and confirm if he/she is still available. If received acknowledgement from client, it means browser tab is still open. So we will not destroy the session.</li>
  </ul>
  
  <p>Here in last rule, how to intercept the session destroy mechanism of spring ?
  How to skip session destroy if acknowledgement is received from client ?</p>
  
  <p>Thanks,</p>