title: How to work with TDSSessionManager.Instance.foreachsession (Delphi XE5)
body: <p>I have problem on understanding how to work with the foreachsession method of the TDSSessionManager.Instance. (I need an example if anyone have). a real example.</p>
  
  <p>I want to do the following:
   one client connect to my DataSnap server. 
   I save one value in the session. like this ... session.PutData('IDRETEA', "1");</p>
  
  <p>I want to deny other clients connecting with the same value until the first connection finish his job.</p>
  
  <p>how to iterate thru all the session and compare IDRETEA with the value finded in my current session? (based on some bussines logical).</p>
  
  <p>I kinda want to implement this behavior on 
   procedure TsrvContainer.dssServerMainConnect(DSConnectEventObject: TDSConnectEventObject);</p>
  
  <p>here I have all values and I can raise an exception if I find another user and the client will know to resume the job (1,2,3 minute later), the server being "busy" now.</p>