Hi,

The following client code executes with no issues when using the internal http 
client. When I try to use the apache http client extension the code hangs on 
the post method until it times out and returns a 1001 error code.

final Context context = new Context();
                         context.getParameters().set("maxConnectionsPerHost", 
"20");
                         context.getParameters().add("tracing", "true");
                        ClientResource requestResource = new 
ClientResource(context,
                                        "http://localhost:8888/persistence";);
                        requestResource.getClientInfo().getAcceptedMediaTypes()
                                        .add(new 
Preference<MediaType>(MediaType.APPLICATION_JSON));
                        try {
                                String reply = requestResource.post(
                                                new 
JsonRepresentation("{response:{status:0}}"),
                                                
JsonRepresentation.class).getText();
                        } catch (ResourceException e) {
                                e.printStackTrace();
                        } finally {
                                Representation entity = 
requestResource.getResponseEntity();
                                if (entity != null)
                                        entity.release();
                        }


Any ideas why this could be happening?

Thx

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2804407

Reply via email to