code: public static void schemaExportExecute(boolean script, boolean export, Writer fileOutput, Statement statement, String sql, SchemaExport schemaExport)
              throws IOException, SQLException {
          if (schemaExportPerform == null) {
              try {
                  schemaExportPerform = SchemaExport.class.getMethod("executeApi", boolean.class, boolean.class, Writer.class, Statement.class, String.class, String.class);
              } catch (NoSuchMethodException e) {
                  LOG.error("cannot find api method inserted by patch", e);
              }
          }
          for (String singleSql : splitSQL(sql)) {
              SqlStatement ddlStmt = prepareDDL(singleSql);
              try {
                  schemaExportPerform.invoke(schemaExport, new Object[]{script, export, fileOutput, statement, ddlStmt.getSql(), ddlStmt.getDelimiter()});
              } catch (InvocationTargetException e) {
                  if (e.getCause() instanceof SQLException && !isEmptyStatement(singleSql)) {
                      LOG.warn("failed executing sql: {}", singleSql);
                      LOG.warn("failure: {}", e.getCause().getMessage());
                  }
              } catch (Exception e) {
                  LOG.error("error calling patched api method in SchemaExport", e);
              }
          }
      }
docs: Hibernate 3