axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIS2-5866) Axis ignores org.apache.axis2.client.Options#getTimeOutInMilliSeconds
Date Sun, 27 Aug 2017 12:05:01 GMT

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

Andreas Veithen commented on AXIS2-5866:
----------------------------------------

This code has significantly changed on the trunk. Can you test that with 1.8.0-SNAPSHOT?

> Axis ignores org.apache.axis2.client.Options#getTimeOutInMilliSeconds
> ---------------------------------------------------------------------
>
>                 Key: AXIS2-5866
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5866
>             Project: Axis2
>          Issue Type: Bug
>          Components: client-api, transports
>    Affects Versions: 1.7.4
>         Environment: Java 8, Tomcat
>            Reporter: Mykhailo Hodovaniuk
>            Priority: Minor
>
> According to documentation https://axis.apache.org/axis2/java/core/docs/http-transport.html
the timeouts can be defined:
> {code:java}
> For runtime configuration, it can be set as follows within the client stub:
> ...
> Options options = new Options();
> options.setProperty(HTTPConstants.SO_TIMEOUT, new Integer(timeOutInMilliSeconds));
> options.setProperty(HTTPConstants.CONNECTION_TIMEOUT, new Integer(timeOutInMilliSeconds));
> // or
> options.setTimeOutInMilliSeconds(timeOutInMilliSeconds);
> ...
> {code}
> But instead, Axis ignores this property because: _org.apache.axis2.transport.http.CommonsHTTPTransportSender#invoke_
has code 
> {code:java}
> // set the property values only if they are not set by the user explicitly
>             if (msgContext.getProperty(HTTPConstants.SO_TIMEOUT) == null) {
>                 msgContext.setProperty(HTTPConstants.SO_TIMEOUT, soTimeout);
>             }
>             if (msgContext.getProperty(HTTPConstants.CONNECTION_TIMEOUT) == null) {
>                 msgContext.setProperty(HTTPConstants.CONNECTION_TIMEOUT, connectionTimeout);
>             }
> {code}
>  where _connectionTimeout_ and _soTimeout_ are always non null.
> At the same time _org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl#setTimeouts_
tries to define these values if they are null with timeOutInMilliSeconds.
> The problem is that _org.apache.axis2.transport.http.CommonsHTTPTransportSender#invoke_
is higher in call hirarchy so the _org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl#setTimeouts_
does not work as expected. The _SO_TIMEOUT_ and _CONNECTION_TIMEOUT_ parameters are always
defined inside _org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl#setTimeouts_.
> The workaround is to define timeouts in axis2.xml.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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


Mime
View raw message