HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
HttpProtocolParams.setUseExpectContinue(params, false);
HttpConnectionManagerParams.setDefaultMaxConnectionsPerHost(params, 1);
HttpConnectionManagerParams.setMaxTotalConnections(params, 1);
SchemeRegistry schreg = new SchemeRegistry();
SocketFactory sf = PlainSocketFactory.getSocketFactory();
schreg.register(new Scheme("http", sf, 80));
XTSCCM mgr = new XTSCCM(params, schreg);
try {
// take out the only connection