axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mykhailo Hodovaniuk (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AXIS2-5866) Axis ignores org.apache.axis2.client.Options#getTimeOutInMilliSeconds
Date Mon, 14 Aug 2017 13:30:00 GMT

     [ https://issues.apache.org/jira/browse/AXIS2-5866?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Mykhailo Hodovaniuk updated AXIS2-5866:
---------------------------------------
    Description: 
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.

  was:
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.


> 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