Author: amilas Date: Fri Feb 20 06:47:54 2009 New Revision: 746168 URL: http://svn.apache.org/viewvc?rev=746168&view=rev Log: although SO_TIMEOUT and CONNECTION_TIMEOUT that is not make any effect at runtime. set these variable to message context if already has not been set
Modified: webservices/commons/trunk/modules/transport/modules/http/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java Modified: webservices/commons/trunk/modules/transport/modules/http/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/transport/modules/http/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java?rev=746168&r1=746167&r2=746168&view=diff ============================================================================== --- webservices/commons/trunk/modules/transport/modules/http/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java (original) +++ webservices/commons/trunk/modules/transport/modules/http/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java Fri Feb 20 06:47:54 2009 @@ -164,6 +164,20 @@ TransportOutDescription transportOut = msgContext.getConfigurationContext(). getAxisConfiguration().getTransportOut(Constants.TRANSPORT_HTTP); + // set the timeout properteies + + Parameter soTimeoutParam = transportOut.getParameter(HTTPConstants.SO_TIMEOUT); + Parameter connTimeoutParam = transportOut.getParameter(HTTPConstants.CONNECTION_TIMEOUT); + + // set the property valuse only if they are not set by the user explicitly + if ((soTimeoutParam != null) && (msgContext.getProperty(HTTPConstants.SO_TIMEOUT) == null)) { + msgContext.setProperty(HTTPConstants.SO_TIMEOUT, new Integer((String)soTimeoutParam.getValue())); + } + + if ((connTimeoutParam != null) && (msgContext.getProperty(HTTPConstants.CONNECTION_TIMEOUT) == null)) { + msgContext.setProperty(HTTPConstants.CONNECTION_TIMEOUT, new Integer((String)connTimeoutParam.getValue())); + } + //if a parameter has set been set, we will omit the SOAP action for SOAP 1.2 if (transportOut != null) { if (!msgContext.isSOAP11()) {