Skip to content

Commit 6a6b3e4

Browse files
Merge pull request #84 from mahendya1002/future
Http connenction created with HttpClientConnection are not getting reused
2 parents 28c8b09 + 82c5ad0 commit 6a6b3e4

4 files changed

Lines changed: 13 additions & 5 deletions

File tree

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
language: java
2+
"dist": "precise"
23
jdk:
4+
- oraclejdk8
35
- oraclejdk7
46
- openjdk7
5-
- openjdk6
7+
- openjdk6

java/src/main/java/com/cybersource/ws/client/HttpClientConnection.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,13 @@ void postDocument(Document request)
6060
throws IOException, TransformerConfigurationException,
6161
TransformerException, MalformedURLException,
6262
ProtocolException {
63-
HttpClient httpClient = new HttpClient();
63+
64+
/*
65+
* SimpleHttpConnectionManager(boolean alwaysClose) :
66+
* alwaysClose - if set true, the connection manager will always close connections upon release.
67+
*/
68+
69+
HttpClient httpClient = new HttpClient(new SimpleHttpConnectionManager(true));
6470
setTimeout(httpClient, mc.getTimeout() * 1000);
6571
setProxy(httpClient);
6672

java/src/main/java/com/cybersource/ws/client/Utility.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ private Utility() {
4848
/**
4949
* Version number of this release.
5050
*/
51-
public static final String VERSION = "6.2.3";
51+
public static final String VERSION = "6.2.5";
5252

5353
/**
5454
* If in the Request map, a key called "_has_escapes" is present and is set

java/src/main/resources/cybs.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ sendToAkamai=true
1717

1818
#To use your own Http library set useClientHttpFactoryFlag to true
1919
# set useClientHttpFactory field with the class name which has Http implementation
20-
#useClientHttpFactory=AmazonHttpConnection
21-
#useClientHttpFactoryFlag=true
20+
#useClientHttpFactory=
21+
#useClientHttpFactoryFlag=false
2222

2323
#useHttpClient=false
2424

0 commit comments

Comments
 (0)