Tag Archives: client

Limiting threads used for asynchronous requests – Jersey Client

Jersey Client already has support for making asynchronous requests, but it uses default ExecutorService, which spawns new thread for each request, which is not very convenient in most of cases. You can set your own ExecutorService (see Client.setExecutorService()) and limit … Continue reading

Posted in java | Tagged , , , | Leave a comment

Replacing client used in Jersey Test Framework

There was an interesting question on mailing list – Is it possible to replace default Jersey client in JerseyTest? (JerseyTest is a class from Jersey Test Framework, basically superclass of all “Jersey enabled” tests). Answer is.. not really. It just … Continue reading

Posted in java | Tagged , , , , | Leave a comment

Jersey Client – Making requests with HttpURLConnection hack

HttpURLConnection provided in JDK has serious limitation – you can’t do requests with arbitrary chosen method – actually it limit methods to some subsed defined in javadoc, which is NOT extendable in any way.. which might cause some problems. For … Continue reading

Posted in java | Tagged , , , | Leave a comment