[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
Tue Jan 24 06:05:18 EST 2012
[ https://issues.jboss.org/browse/MODCLUSTER-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12661395#comment-12661395 ]
Stefano Nichele commented on MODCLUSTER-278:
--------------------------------------------
Just found that NoSuchMethodErrors approach is already used to fix jira #MODCLUSTER-240 (https://issues.jboss.org/browse/MODCLUSTER-240).
At this point i would reconsider my first fix.
> 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