[mod_cluster-issues] [JBoss JIRA] (MODCLUSTER-278) CatalinaConnector.setAddress not working with Tomcat <= 6.0.14

Stefano Nichele (JIRA) jira-events at lists.jboss.org
Mon Jan 23 11:31:18 EST 2012


Stefano Nichele created MODCLUSTER-278:
------------------------------------------

             Summary: CatalinaConnector.setAddress not working with Tomcat <= 6.0.14
                 Key: MODCLUSTER-278
                 URL: https://issues.jboss.org/browse/MODCLUSTER-278
             Project: mod_cluster
          Issue Type: Bug
    Affects Versions: 1.1.3.Final
         Environment: Tomcat 6.0.13 + jdk 1.6
            Reporter: Stefano Nichele
            Assignee: Jean-Frederic Clere


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());





--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the mod_cluster-issues mailing list