Bug 57864

Summary: channelSendOptions attribute is not able to be configured in hexadecimal
Product: Tomcat 8 Reporter: Kyohei Nakamura <nakamura.kyohei.lab>
Component: DocumentationAssignee: Tomcat Developers Mailing List <dev>
Severity: normal    
Priority: P2    
Version: 8.0.x-trunk   
Target Milestone: ----   
Hardware: All   
OS: All   
Attachments: patch against trunk.

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.

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.