title: Maintain session in grails
body: <p>How to maintain session in my grails application. Here is my requirement.</p>
  
  <ol>
  <li>I have to generate session id (in server side) based on the user-name (which comes from client side while log-in).</li>
  <li>After log-in, the server should pass the session id to client and sets timer to validate the session.</li>
  <li>For every request, the client should pass the session id to server, so that the server is able to check whether the session is alive or not based on the timer.</li>
  <li>If the session is valid, the server should process the request and has to increment the timer.</li>
  <li>If the session in invalid, the request should not be processed by server.</li>
  </ol>
  
  <p>Please let me know if you any idea/tutorial/suggestions.</p>
  
  <p>Thanks in advance...</p>