You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Rémi Flament (JIRA)" <ax...@ws.apache.org> on 2006/06/07 15:39:29 UTC

[jira] Created: (AXIS-2493) DefaultCommonsHTTPClientProperties timeout not used.

DefaultCommonsHTTPClientProperties timeout not used.
----------------------------------------------------

         Key: AXIS-2493
         URL: http://issues.apache.org/jira/browse/AXIS-2493
     Project: Apache Axis
        Type: Bug

  Components: Basic Architecture  
    Versions: 1.4    
 Environment: Windows XP
    Reporter: Rémi Flament
 Attachments: axis-timeout.patch

The DefaultCommonsHTTPClientProperties timeout properties are not used in Axis because MessageContext has a default timeout.

So even if you use this code :

AxisProperties.setProperty(DefaultCommonsHTTPClientProperties.CONNECTION_DEFAULT_CONNECTION_TIMEOUT_KEY, "3000");
AxisProperties.setProperty(DefaultCommonsHTTPClientProperties.CONNECTION_DEFAULT_SO_TIMEOUT_KEY, "3000");

before calling a webservice, the default timeout (60 seconds) is still used.

Here's why :

In MessageContext the property timeout = Constants.DEFAULT_MESSAGE_TIMEOUT (60 seconds), and in CommonsHTTPSender, in the method addContextInfo :

 // optionally set a timeout for the request
        if (msgContext.getTimeout() != 0) {
            httpClient.getHttpConnectionManager().getParams().setSoTimeout(msgContext.getTimeout());

since msgContext.getTimeout() is never equals to 0, except if the user *did* change it to 0, the httpClient timeout is always set to 60 seconds, except if the user set it to 0 on every MessageContext instances he creates...

I created a patch which allows global configuration with httpclient and which allow user to change the timeout for a particular MessageContext. (attached)

Regards,

Rémi Flament




-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS-2493) DefaultCommonsHTTPClientProperties timeout not used.

Posted by "Rémi Flament (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2493?page=comments#action_12415148 ] 

Rémi Flament commented on AXIS-2493:
------------------------------------

I just realized that there is actually another important bug in the addContextInfo method :

if (msgContext.getTimeout() != 0) {
            // SO_TIMEOUT -- timeout for blocking reads
            httpClient.getHttpConnectionManager().getParams().setSoTimeout(msgContext.getTimeout());
            // timeout for initial connection
            httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(msgContext.getTimeout());
        }

This code change the settings for the connection manager, not for only the current connection. 
So if the user set a timeout for only one connection, there will be a timeout for every connection created after this one.

There should be something like :

if (msgContext.getTimeout() != 0) {
            // SO_TIMEOUT -- timeout for blocking reads
            httpClient.getHttpConnectionManager().getParams().setSoTimeout(msgContext.getTimeout());
            // timeout for initial connection
            httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(msgContext.getTimeout());
        }
else
 [

> DefaultCommonsHTTPClientProperties timeout not used.
> ----------------------------------------------------
>
>          Key: AXIS-2493
>          URL: http://issues.apache.org/jira/browse/AXIS-2493
>      Project: Apache Axis
>         Type: Bug

>   Components: Basic Architecture
>     Versions: 1.4
>  Environment: Windows XP
>     Reporter: Rémi Flament
>  Attachments: axis-timeout.patch
>
> The DefaultCommonsHTTPClientProperties timeout properties are not used in Axis because MessageContext has a default timeout.
> So even if you use this code :
> AxisProperties.setProperty(DefaultCommonsHTTPClientProperties.CONNECTION_DEFAULT_CONNECTION_TIMEOUT_KEY, "3000");
> AxisProperties.setProperty(DefaultCommonsHTTPClientProperties.CONNECTION_DEFAULT_SO_TIMEOUT_KEY, "3000");
> before calling a webservice, the default timeout (60 seconds) is still used.
> Here's why :
> In MessageContext the property timeout = Constants.DEFAULT_MESSAGE_TIMEOUT (60 seconds), and in CommonsHTTPSender, in the method addContextInfo :
>  // optionally set a timeout for the request
>         if (msgContext.getTimeout() != 0) {
>             httpClient.getHttpConnectionManager().getParams().setSoTimeout(msgContext.getTimeout());
> since msgContext.getTimeout() is never equals to 0, except if the user *did* change it to 0, the httpClient timeout is always set to 60 seconds, except if the user set it to 0 on every MessageContext instances he creates...
> I created a patch which allows global configuration with httpclient and which allow user to change the timeout for a particular MessageContext. (attached)
> Regards,
> Rémi Flament

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS-2493) DefaultCommonsHTTPClientProperties timeout not used.

Posted by "Rémi Flament (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2493?page=comments#action_12415149 ] 

Rémi Flament commented on AXIS-2493:
------------------------------------

oops...

else {
       // reset default settings
}

Regards.

> DefaultCommonsHTTPClientProperties timeout not used.
> ----------------------------------------------------
>
>          Key: AXIS-2493
>          URL: http://issues.apache.org/jira/browse/AXIS-2493
>      Project: Apache Axis
>         Type: Bug

>   Components: Basic Architecture
>     Versions: 1.4
>  Environment: Windows XP
>     Reporter: Rémi Flament
>  Attachments: axis-timeout.patch
>
> The DefaultCommonsHTTPClientProperties timeout properties are not used in Axis because MessageContext has a default timeout.
> So even if you use this code :
> AxisProperties.setProperty(DefaultCommonsHTTPClientProperties.CONNECTION_DEFAULT_CONNECTION_TIMEOUT_KEY, "3000");
> AxisProperties.setProperty(DefaultCommonsHTTPClientProperties.CONNECTION_DEFAULT_SO_TIMEOUT_KEY, "3000");
> before calling a webservice, the default timeout (60 seconds) is still used.
> Here's why :
> In MessageContext the property timeout = Constants.DEFAULT_MESSAGE_TIMEOUT (60 seconds), and in CommonsHTTPSender, in the method addContextInfo :
>  // optionally set a timeout for the request
>         if (msgContext.getTimeout() != 0) {
>             httpClient.getHttpConnectionManager().getParams().setSoTimeout(msgContext.getTimeout());
> since msgContext.getTimeout() is never equals to 0, except if the user *did* change it to 0, the httpClient timeout is always set to 60 seconds, except if the user set it to 0 on every MessageContext instances he creates...
> I created a patch which allows global configuration with httpclient and which allow user to change the timeout for a particular MessageContext. (attached)
> Regards,
> Rémi Flament

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Issue Comment Edited: (AXIS-2493) DefaultCommonsHTTPClientProperties timeout not used.

Posted by "Ejaz A Syed (JIRA)" <ax...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS-2493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534400 ] 

esyed edited comment on AXIS-2493 at 10/13/07 10:53 PM:
--------------------------------------------------------------

Using commons-httpclient v3.0 and axis 1.4, the problem persists where the connection(s) do not get time-out. The observed behavior was that the connections were not even getting timed out after 60 secs.

      was (Author: esyed):
    Using commons-httpclient v3.0 and axis 1.4, the problem persists where the connection(s) do not get time-out. Is this still an open bug. The observed behavior was that the connections were not even getting timed out after 60 secs.
  
> DefaultCommonsHTTPClientProperties timeout not used.
> ----------------------------------------------------
>
>                 Key: AXIS-2493
>                 URL: https://issues.apache.org/jira/browse/AXIS-2493
>             Project: Axis
>          Issue Type: Bug
>          Components: Basic Architecture
>    Affects Versions: 1.4
>         Environment: Windows XP
>            Reporter: Rémi Flament
>         Attachments: axis-timeout-2.patch, axis-timeout.patch
>
>
> The DefaultCommonsHTTPClientProperties timeout properties are not used in Axis because MessageContext has a default timeout.
> So even if you use this code :
> AxisProperties.setProperty(DefaultCommonsHTTPClientProperties.CONNECTION_DEFAULT_CONNECTION_TIMEOUT_KEY, "3000");
> AxisProperties.setProperty(DefaultCommonsHTTPClientProperties.CONNECTION_DEFAULT_SO_TIMEOUT_KEY, "3000");
> before calling a webservice, the default timeout (60 seconds) is still used.
> Here's why :
> In MessageContext the property timeout = Constants.DEFAULT_MESSAGE_TIMEOUT (60 seconds), and in CommonsHTTPSender, in the method addContextInfo :
>  // optionally set a timeout for the request
>         if (msgContext.getTimeout() != 0) {
>             httpClient.getHttpConnectionManager().getParams().setSoTimeout(msgContext.getTimeout());
> since msgContext.getTimeout() is never equals to 0, except if the user *did* change it to 0, the httpClient timeout is always set to 60 seconds, except if the user set it to 0 on every MessageContext instances he creates...
> I created a patch which allows global configuration with httpclient and which allow user to change the timeout for a particular MessageContext. (attached)
> Regards,
> Rémi Flament

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS-2493) DefaultCommonsHTTPClientProperties timeout not used.

Posted by "Rémi Flament (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2493?page=all ]

Rémi Flament updated AXIS-2493:
-------------------------------

    Attachment: axis-timeout-2.patch

This patch reset the default settings for connection timeout if the user didn't change the messageContext timeout.

> DefaultCommonsHTTPClientProperties timeout not used.
> ----------------------------------------------------
>
>          Key: AXIS-2493
>          URL: http://issues.apache.org/jira/browse/AXIS-2493
>      Project: Apache Axis
>         Type: Bug

>   Components: Basic Architecture
>     Versions: 1.4
>  Environment: Windows XP
>     Reporter: Rémi Flament
>  Attachments: axis-timeout-2.patch, axis-timeout.patch
>
> The DefaultCommonsHTTPClientProperties timeout properties are not used in Axis because MessageContext has a default timeout.
> So even if you use this code :
> AxisProperties.setProperty(DefaultCommonsHTTPClientProperties.CONNECTION_DEFAULT_CONNECTION_TIMEOUT_KEY, "3000");
> AxisProperties.setProperty(DefaultCommonsHTTPClientProperties.CONNECTION_DEFAULT_SO_TIMEOUT_KEY, "3000");
> before calling a webservice, the default timeout (60 seconds) is still used.
> Here's why :
> In MessageContext the property timeout = Constants.DEFAULT_MESSAGE_TIMEOUT (60 seconds), and in CommonsHTTPSender, in the method addContextInfo :
>  // optionally set a timeout for the request
>         if (msgContext.getTimeout() != 0) {
>             httpClient.getHttpConnectionManager().getParams().setSoTimeout(msgContext.getTimeout());
> since msgContext.getTimeout() is never equals to 0, except if the user *did* change it to 0, the httpClient timeout is always set to 60 seconds, except if the user set it to 0 on every MessageContext instances he creates...
> I created a patch which allows global configuration with httpclient and which allow user to change the timeout for a particular MessageContext. (attached)
> Regards,
> Rémi Flament

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS-2493) DefaultCommonsHTTPClientProperties timeout not used.

Posted by "Ejaz A Syed (JIRA)" <ax...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS-2493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12534400 ] 

Ejaz A Syed commented on AXIS-2493:
-----------------------------------

Using commons-httpclient v3.0 and axis 1.4, the problem persists where the connection(s) do not get time-out. Is this still an open bug. The observed behavior was that the connections were not even getting timed out after 60 secs.

> DefaultCommonsHTTPClientProperties timeout not used.
> ----------------------------------------------------
>
>                 Key: AXIS-2493
>                 URL: https://issues.apache.org/jira/browse/AXIS-2493
>             Project: Axis
>          Issue Type: Bug
>          Components: Basic Architecture
>    Affects Versions: 1.4
>         Environment: Windows XP
>            Reporter: Rémi Flament
>         Attachments: axis-timeout-2.patch, axis-timeout.patch
>
>
> The DefaultCommonsHTTPClientProperties timeout properties are not used in Axis because MessageContext has a default timeout.
> So even if you use this code :
> AxisProperties.setProperty(DefaultCommonsHTTPClientProperties.CONNECTION_DEFAULT_CONNECTION_TIMEOUT_KEY, "3000");
> AxisProperties.setProperty(DefaultCommonsHTTPClientProperties.CONNECTION_DEFAULT_SO_TIMEOUT_KEY, "3000");
> before calling a webservice, the default timeout (60 seconds) is still used.
> Here's why :
> In MessageContext the property timeout = Constants.DEFAULT_MESSAGE_TIMEOUT (60 seconds), and in CommonsHTTPSender, in the method addContextInfo :
>  // optionally set a timeout for the request
>         if (msgContext.getTimeout() != 0) {
>             httpClient.getHttpConnectionManager().getParams().setSoTimeout(msgContext.getTimeout());
> since msgContext.getTimeout() is never equals to 0, except if the user *did* change it to 0, the httpClient timeout is always set to 60 seconds, except if the user set it to 0 on every MessageContext instances he creates...
> I created a patch which allows global configuration with httpclient and which allow user to change the timeout for a particular MessageContext. (attached)
> Regards,
> Rémi Flament

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS-2493) DefaultCommonsHTTPClientProperties timeout not used.

Posted by "Rémi Flament (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2493?page=all ]

Rémi Flament updated AXIS-2493:
-------------------------------

    Attachment: axis-timeout.patch

> DefaultCommonsHTTPClientProperties timeout not used.
> ----------------------------------------------------
>
>          Key: AXIS-2493
>          URL: http://issues.apache.org/jira/browse/AXIS-2493
>      Project: Apache Axis
>         Type: Bug

>   Components: Basic Architecture
>     Versions: 1.4
>  Environment: Windows XP
>     Reporter: Rémi Flament
>  Attachments: axis-timeout.patch
>
> The DefaultCommonsHTTPClientProperties timeout properties are not used in Axis because MessageContext has a default timeout.
> So even if you use this code :
> AxisProperties.setProperty(DefaultCommonsHTTPClientProperties.CONNECTION_DEFAULT_CONNECTION_TIMEOUT_KEY, "3000");
> AxisProperties.setProperty(DefaultCommonsHTTPClientProperties.CONNECTION_DEFAULT_SO_TIMEOUT_KEY, "3000");
> before calling a webservice, the default timeout (60 seconds) is still used.
> Here's why :
> In MessageContext the property timeout = Constants.DEFAULT_MESSAGE_TIMEOUT (60 seconds), and in CommonsHTTPSender, in the method addContextInfo :
>  // optionally set a timeout for the request
>         if (msgContext.getTimeout() != 0) {
>             httpClient.getHttpConnectionManager().getParams().setSoTimeout(msgContext.getTimeout());
> since msgContext.getTimeout() is never equals to 0, except if the user *did* change it to 0, the httpClient timeout is always set to 60 seconds, except if the user set it to 0 on every MessageContext instances he creates...
> I created a patch which allows global configuration with httpclient and which allow user to change the timeout for a particular MessageContext. (attached)
> Regards,
> Rémi Flament

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org