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 "Jesse Mosemann (JIRA)" <ax...@ws.apache.org> on 2017/03/15 21:11:41 UTC
[jira] [Commented] (AXIS-2493) DefaultCommonsHTTPClientProperties
timeout not used.
[ https://issues.apache.org/jira/browse/AXIS-2493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15926997#comment-15926997 ]
Jesse Mosemann commented on AXIS-2493:
--------------------------------------
Why hasn't this patch been implemented in svn or github yet and deployed in maven central?
> 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 was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org