public Object insert(Object obj) throws StorageException, CommunicationException {

    try {

      testStorage();

      return storage.insert(obj);

    } // try
    catch (CommunicationException error) {

      writeLog("Erro de comunicacao: " + error.getMessage());

      for (int counter = 0; counter < getTryNumber(); counter++) {

        try {

          sleep();

          createStorage();

          return storage.insert(obj);

        } // try
        catch (CommunicationException error1) {

          writeLog("Erro de comunicacao: " + error.getMessage());
        } // catch
      } // for

      throw error;
    } // catch
  }