Bug 57864 - channelSendOptions attribute is not able to be configured in hexadecimal
Summary: channelSendOptions attribute is not able to be configured in hexadecimal
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Documentation (show other bugs)
Version: 8.0.x-trunk
Hardware: All All
: P2 normal (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-28 07:21 UTC by Kyohei Nakamura
Modified: 2015-04-28 15:09 UTC (History)
0 users



Attachments
patch against trunk. (826 bytes, patch)
2015-04-28 07:21 UTC, Kyohei Nakamura
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kyohei Nakamura 2015-04-28 07:21:08 UTC
Created attachment 32693 [details]
patch against trunk.

The Cluster configuration document have shown that the channelSendOptions attribute of SimpleTcpCluster element can be configured in hexadecimal.
http://tomcat.apache.org/tomcat-8.0-doc/config/cluster.html

Digester set the value using IntrospectionUtils.setProperty method.
SimpleTcpCluster.setChannelSendOptions method takes an int argument.

Therefore, setProperty method will be attempted to convert hexadecimal using Constructor of Integer Class (See Integer(String s)).
As a result, hexadecimal value will cause a NumberFormatException.

So, the channelSendOptions is not able to be configured in hexadecimal.

On the other hand, when GroupChannel is used on Tomcat, the channelSendOptions will be set 10 or less (SYNC or ASYNC, ACK or Non-ACK), and it will be not set more than 10.
Therefore, the example for hexadecimal ("0x000B") can be remove from the configuration document.
Comment 1 Mark Thomas 2015-04-28 15:09:44 UTC
Thanks for the report and the patch. I have applied a variation of the patch to trunk (for 9.0.x), tc8.0.x/trunk (for 8.0.22 onwards), tc7.0.x/trunk (for 7.0.62 onwards) and tc6.0.x/trunk for 6.0.44 onwards.