code: private synchronized void getThreadLock() {
  		while (sessionId == null && curUsedThread > 1) {
  			try {
  				Debug.logVerbose("No session. Only one thread is authorized. Waiting ...", module);
  				wait();
  			} catch (InterruptedException e) {
  				e.printStackTrace();
  			}
  		}
  
  		while (curUsedThread >= maxThreadCount) {
  			try {
  				Debug.logVerbose("[JdonFramework]Max concurent http call reached. Waiting ...", module);
  				wait();
  			} catch (InterruptedException e) {
  				e.printStackTrace();
  			}
  		}
  		curUsedThread++;
  	}
docs: This method is used to limit the concurrent http call to the max fixed by
  maxThreadCount and to wait the end of the first call that will return the
  session id.