Uploaded image for project: 'ManifoldCF'
  1. ManifoldCF
  2. CONNECTORS-1727

Timeout values for Genreric Authority is not updated after setting

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • ManifoldCF 2.24
    • None
    • None

    Description

      Hi there,

      As there is a problem that is still not addressed during use, I would like to suggest the following correction for the source code of the Generic Authority Connector.
      ※This is the same issue as that in Generic Repository Connector, which was resolved at CONNECTORS-1726
      For additional details, please see below:

      1. Connector name

      Generic Authority Connector

      2. Issue

      When I create or edit a Generic authority connection, I cannot update the value in the following fields:

      • Connection timeout (milis)
      • Socket timeout (milis)

      3. Reproduction

      • Create a Generic authority connection
        • On Entry point tab, edit the values of Connection timeout (milis) and Socket timeout (milis) fields
        • Click on Save button
      • On View Authority Connection Status - Generic screen, it can be seen that the values of the 2 above fields are not updated.

      4. Cause

      The names of the textboxes for the 2 fields are the followings:

      • genericConTimeout
      • genericSoTimeout

      However, the names that are being used inside the source code are the followings:

      • genericConnectionTimeout
      • genericSocketTimeout

      This results in that new values can not be obtained, thus the values of the 2 fields can not be updated.

      5. Solution

      Update parameter names for Connection Timeout and Socket Timeout with names that are being stored inside the DataBase:

      • genericConTimeout ➞ genericConnectionTimeout
      • genericSoTimeout ➞ genericSocketTimeout

      6. Suggested source code (based on release 2.22.1)

      https://github.com/apache/manifoldcf/blob/release-2.22.1/connectors/generic/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/generic/GenericAuthority.java#L400

              + " <tr>\n"
              + "  <td class=\"description\"><nobr>" + Messages.getBodyString(locale, "generic.ConnectionTimeoutColon") + "</nobr></td>\n"
      -       + "  <td class=\"value\"><input type=\"text\" size=\"32\" name=\"genericConTimeout\" value=\"" + Encoder.attributeEscape(conTimeout) + "\"/></td>\n"
      +       + "  <td class=\"value\"><input type=\"text\" size=\"32\" name=\"genericConnectionTimeout\" value=\"" + Encoder.attributeEscape(conTimeout) + "\"/></td>\n"
              + " </tr>\n"
              + " <tr>\n"
              + "  <td class=\"description\"><nobr>" + Messages.getBodyString(locale, "generic.SocketTimeoutColon") + "</nobr></td>\n"
      -       + "  <td class=\"value\"><input type=\"text\" size=\"32\" name=\"genericSoTimeout\" value=\"" + Encoder.attributeEscape(soTimeout) + "\"/></td>\n"
      +       + "  <td class=\"value\"><input type=\"text\" size=\"32\" name=\"genericSocketTimeout\" value=\"" + Encoder.attributeEscape(soTimeout) + "\"/></td>\n"
              + " </tr>\n"
      

      https://github.com/apache/manifoldcf/blob/release-2.22.1/connectors/generic/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/generic/GenericAuthority.java#L415

      -     out.print("<input type=\"hidden\" name=\"genericConTimeout\" value=\"" + Encoder.attributeEscape(conTimeout) + "\"/>\n");
      -     out.print("<input type=\"hidden\" name=\"genericSoTimeout\" value=\"" + Encoder.attributeEscape(soTimeout) + "\"/>\n");
      +     out.print("<input type=\"hidden\" name=\"genericConnectionTimeout\" value=\"" + Encoder.attributeEscape(conTimeout) + "\"/>\n");
      +     out.print("<input type=\"hidden\" name=\"genericSocketTimeout\" value=\"" + Encoder.attributeEscape(soTimeout) + "\"/>\n");
      

      https://github.com/apache/manifoldcf/blob/release-2.22.1/connectors/generic/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/generic/GenericAuthority.java#L428

      -   copyParam(variableContext, parameters, "genericConTimeout");
      -   copyParam(variableContext, parameters, "genericSoTimeout");
      +   copyParam(variableContext, parameters, "genericConnectionTimeout");
      +   copyParam(variableContext, parameters, "genericSocketTimeout");
      

      Attachments

        Activity

          People

            kwright@metacarta.com Karl Wright
            NhatNH Nguyen Huu Nhat
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: