You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Jacques Le Roux (JIRA)" <ji...@apache.org> on 2011/06/01 15:17:47 UTC

[jira] [Issue Comment Edited] (AMQ-1860) soTimeout transport property- Incorrect documentation (or code, you pick)

    [ https://issues.apache.org/jira/browse/AMQ-1860?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042156#comment-13042156 ] 

Jacques Le Roux edited comment on AMQ-1860 at 6/1/11 1:17 PM:
--------------------------------------------------------------

Hi,

Why, unlike proposed  Filip, the soTimeout is still at 0 by default?

This is from the current documentation at http://activemq.apache.org/tcp-transport-reference.html

I had a quick look at the 5.4.2 code and I see that TcpTransportServer.configureServerSocket() sets soTimeout to 2000 and is called in TcpTransportServer.bind() which is itself used by TransportServer.doBind(). I stopped there, so maybe I'm missing something...

      was (Author: jacques.le.roux):
    Hi,

Why, unlike proposed  Filip, the soTimeout is still at 0 by default?

This is from the current documentation at http://activemq.apache.org/tcp-transport-reference.html

I had a quick look at the code and I see that TcpTransportServer.configureServerSocket() sets soTimeout to 2000 and is called in TcpTransportServer.bind() which is itself used by TransportServer.doBind(). I stopped there, so maybe I'm missing something...
  
> soTimeout transport property- Incorrect documentation (or code, you pick)
> -------------------------------------------------------------------------
>
>                 Key: AMQ-1860
>                 URL: https://issues.apache.org/jira/browse/AMQ-1860
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker, Documentation
>    Affects Versions: 5.0.0, 5.1.0
>         Environment: All
>            Reporter: Filip Hanik
>            Assignee: Rob Davies
>             Fix For: 5.2.0
>
>         Attachments: transport-options.patch
>
>
> The documentation for TCP transport, shows soTimeout, connectionTimeout and socketBufferSize as properties without a prefix.
> The code in TcpTransportServer.java doesn't have the support for these properties.
> hence setting a URL to tcp://192.168.3.3:61616?soTimeout=180000 does nothing, and defaults to soTimeout=0 (which is a bad value due to how sockets get closed, and can cause the system to hang on  a socketWrite call, causing the rest of the server to hang, but I can explain that on the dev lists for those interested)
> Bug description: Transport properties are incorrectly document or implemented
> There are two solutions to this bug:
> 1. The preferred, would be to fix the documentation
> http://activemq.apache.org/tcp-transport-reference.html
> the mentioned options will work if they are prefixed with "transport."
> so the URL would be 
> tcp://192.168.3.3:61616?transport.soTimeout=180000
> 2. Add the properties with their getters/setters into TcpTransportServer.java and then during the handleSocket method add them to the options map
> Please note, this bug refers to the soTimeout setting on the socket that gets created on the server when a producer/consumer connects in using TCP
> best
> Filip

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira