I'm new to the world of Restlet, but i'm finding it a really expressive
framework.

I have an application which sends POST requests to a Restlet server using
the Restlet Client library, using threads for each POST request.

Upon sending the third request, the thread will block indefinitely.  It
seems the previous requests never release the connection back to the pool,
even though I am explicitly calling release() in my finally block:
        try {
            System.out.println("connection # " + ++count);
            response = client.handle(request);
            status = response.getStatus();
            text = response.getEntity().getText(); // should close the
representation
        } catch (IOException e) {
            throw new RuntimeException (e);
        } finally {
            response.getEntity().release();
        }

If I adjust maxConnectionsPerHost, the number of requests before blocking
goes up by the same amount.

What am I doing wrong?  Is there another step to make sure the
representation is completely read and released?

-- 
Eric

Reply via email to