code: public void run() {
          if(log.isDebugEnabled()) {
              log.debug("ListenerThread Starting.");
          }
  
          while(running) {
              try {
                  Socket clientSocket = serverSocket.accept();
  
                  WorkerThread worker = new WorkerThread(container, clientSocket);
                  worker.start();
  
              } catch(SocketTimeoutException ste) {
                  // Ignore. We receive one of these every second, when the accept()
                  // method times out. This is done to give us the opportunity to break
                  // out of the blocking accept() call in order to shut down cleanly.
  
              } catch(Exception e) {
                  if(log.isErrorEnabled()) {
                      log.error("Error Accepting: " + e.toString(), e);
                  }
              }
          }
  
  		try {
  			serverSocket.close();
  			
  		} catch (IOException e) {
  			if(log.isErrorEnabled()) {
  				log.error("Error closing the server socket: " + e.toString(), e);
  			}
  		}
      }
docs: ListenerThread execution begins.