code: private boolean subscribe(String path, EventType watchType,
        long transactionId)
            throws TransactionIdTooOldException, InterruptedException {
      ServerHandler.Client server = connectionManager.getServer();
      NamespaceEvent event =  new NamespaceEvent(path, watchType.getByteValue());
      
      if (LOG.isDebugEnabled()) {
        LOG.debug(listeningPort + ": subscribe: Trying to subscribe for " +
            NotifierUtils.asString(event) + " ... from txId " + transactionId);
      }
      
      for (int retries = 0; retries < 3; retries ++) {
        try {
          server.subscribe(connectionManager.getId(), event, transactionId);
          if (LOG.isDebugEnabled()) {
            LOG.debug(listeningPort + ": subscribe: successful");
          }
          return true;
        } catch (TransactionIdTooOldException e) {
          LOG.warn(listeningPort + ": Failed to subscribe [1]", e);
          throw e;
        } catch (InvalidClientIdException e) {
          LOG.warn(listeningPort + ": Failed to subscribe [2]", e);
        } catch (TException e) {
          LOG.warn(listeningPort + ": Failed to subscribe [3]", e);
          Thread.sleep(1000);
        }
      }
      
      return false;
    }
docs: Should be called with the connection lock acquired and only in the
  <code>CONNECTED</code> state.
  @param path
  @param watchType
  @param transactionId
  @return true if connected, false otherwise.
  @throws TransactionIdTooOldException