private void connect() {
    do {
      try {
	connection = (TACConnection) Class.forName(connectionClassName).
	  newInstance();
      } catch (Exception e) {
	log.log(Level.SEVERE, "could not create TACConnection object of class "
		+ connectionClassName, e);
	fatalError("no TACConnection  available");
      }
      try {
	connection.init(this);
      } catch (Exception e) {
	log.log(Level.SEVERE, "Connection failure:", e);
      }

      if (!connection.isConnected()) {
	log.warning("could not connect to server " + host + " at port "
		    + port + " (will retry in 5 seconds)");
	try {
 	  Thread.sleep(5000);
	} catch (Exception e) {
	}
      }
    } while (!connection.isConnected());
  }