Skip to content

Commit a231bb8

Browse files
committed
SWS-482 - java.lang.IllegalStateException: Connection factory has been shutdown
1 parent ec15995 commit a231bb8

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

core/src/main/java/org/springframework/ws/transport/http/CommonsHttpMessageSender.java

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006 the original author or authors.
2+
* Copyright 2002-2009 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,7 +24,6 @@
2424
import org.apache.commons.httpclient.Credentials;
2525
import org.apache.commons.httpclient.HostConfiguration;
2626
import org.apache.commons.httpclient.HttpClient;
27-
import org.apache.commons.httpclient.HttpConnectionManager;
2827
import org.apache.commons.httpclient.HttpURL;
2928
import org.apache.commons.httpclient.HttpsURL;
3029
import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
@@ -34,7 +33,6 @@
3433
import org.apache.commons.httpclient.auth.AuthScope;
3534
import org.apache.commons.httpclient.methods.PostMethod;
3635

37-
import org.springframework.beans.factory.DisposableBean;
3836
import org.springframework.beans.factory.InitializingBean;
3937
import org.springframework.util.Assert;
4038
import org.springframework.ws.transport.WebServiceConnection;
@@ -53,8 +51,7 @@
5351
* @see #setCredentials(Credentials)
5452
* @since 1.0.0
5553
*/
56-
public class CommonsHttpMessageSender extends AbstractHttpWebServiceMessageSender
57-
implements InitializingBean, DisposableBean {
54+
public class CommonsHttpMessageSender extends AbstractHttpWebServiceMessageSender implements InitializingBean {
5855

5956
private static final int DEFAULT_CONNECTION_TIMEOUT_MILLISECONDS = (60 * 1000);
6057

@@ -217,13 +214,6 @@ public void afterPropertiesSet() throws Exception {
217214
}
218215
}
219216

220-
public void destroy() throws Exception {
221-
HttpConnectionManager connectionManager = getHttpClient().getHttpConnectionManager();
222-
if (connectionManager instanceof MultiThreadedHttpConnectionManager) {
223-
((MultiThreadedHttpConnectionManager) connectionManager).shutdown();
224-
}
225-
}
226-
227217
public WebServiceConnection createConnection(URI uri) throws IOException {
228218
PostMethod postMethod = new PostMethod(uri.toString());
229219
if (isAcceptGzipEncoding()) {

0 commit comments

Comments
 (0)