com.atlassian.crowd.service.soap.client
Class CleaningHttpMessageSender

java.lang.Object
  extended by org.codehaus.xfire.transport.http.AbstractMessageSender
      extended by org.codehaus.xfire.transport.http.CommonsHttpMessageSender
          extended by com.atlassian.crowd.service.soap.client.CleaningHttpMessageSender

public class CleaningHttpMessageSender
extends org.codehaus.xfire.transport.http.CommonsHttpMessageSender

There's a known issue with HttpClient under heavy load, where it can leak connections into CLOSE_WAIT status. XFire doesn't handle creation and disposal of HttpClient and MultithreadedHttpConnectionManager objects smartly enough to prevent this connection leak. So, we subclass the sending component and clean up properly. Discussion that lead us to a solution: http://www.nabble.com/tcp-connections-left-with-CLOSE_WAIT-td13757202.html


Field Summary
 
Fields inherited from class org.codehaus.xfire.transport.http.CommonsHttpMessageSender
DISABLE_EXPECT_CONTINUE, DISABLE_KEEP_ALIVE, DISABLE_PROXY_UTILS, GZIP_ENABLED, GZIP_REQUEST_ENABLED, GZIP_RESPONSE_ENABLED, HTTP_CLIENT, HTTP_CLIENT_PARAMS, HTTP_HEADERS, HTTP_PROXY_HOST, HTTP_PROXY_PASS, HTTP_PROXY_PORT, HTTP_PROXY_USER, HTTP_STATE, HTTP_TIMEOUT, MAX_CONN_PER_HOST, MAX_TOTAL_CONNECTIONS, PROXY_UTILS_CLASS, USER_AGENT
 
Fields inherited from class org.codehaus.xfire.transport.http.AbstractMessageSender
MESSAGE_SENDER_CLASS_NAME
 
Constructor Summary
CleaningHttpMessageSender(org.codehaus.xfire.exchange.OutMessage message, org.codehaus.xfire.MessageContext context)
           
 
Method Summary
 void close()
          Overridden to make sure HttpClient cleans up after itself.
 
Methods inherited from class org.codehaus.xfire.transport.http.CommonsHttpMessageSender
createClient, getClient, getHttpState, getInMessage, getMethod, getStatusCode, hasResponse, open, send
 
Methods inherited from class org.codehaus.xfire.transport.http.AbstractMessageSender
getEncoding, getMessage, getMessageContext, getQuotedSoapAction, getSoapAction, getUri, setMessage, setMessageContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CleaningHttpMessageSender

public CleaningHttpMessageSender(org.codehaus.xfire.exchange.OutMessage message,
                                 org.codehaus.xfire.MessageContext context)
Method Detail

close

public void close()
           throws org.codehaus.xfire.XFireException
Overridden to make sure HttpClient cleans up after itself.

Overrides:
close in class org.codehaus.xfire.transport.http.CommonsHttpMessageSender
Throws:
org.codehaus.xfire.XFireException


Copyright © 2010 Atlassian. All Rights Reserved.