Uploaded image for project: 'mod_cluster'
  1. mod_cluster
  2. MODCLUSTER-278

CatalinaConnector.setAddress not working with Tomcat <= 6.0.14

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 1.1.3.Final
    • None
    • None

    Description

      If in the server.xml file the "address" property is not specified, mod-cluster calls

      IntrospectionUtils.setProperty(this.connector.getProtocolHandler(), "address", address.getHostAddress());

      in order to set the address automatically.

      This calls doesn't work with tomcat <= 6.0.14 (CatalinaConnector.setAddress throws a NoSuchMethodError) since the signature of IntrospectionUtils.setProperty has been changed in tomcat 6.0.15.

      As a fix, I would like to suggest this small changes in CatalinaConnector.setAddress:

      try {
      IntrospectionUtils.setProperty(this.connector.getProtocolHandler(), "address", address.getHostAddress());
      } catch (NoSuchMethodError err) {
      // this works on Tomcat <= 6.0.14
      this.connector.getProtocolHandler().setAttribute("address", address.getHostAddress());
      }

      instead of just:

      IntrospectionUtils.setProperty(this.connector.getProtocolHandler(), "address", address.getHostAddress());

      Attachments

        Activity

          People

            rhn-engineering-jclere Jean-Frederic Clere
            nichele_jira Stefano Nichele (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: