Hi Eric,
 
We have some bugs to squash before Restlet 1.1 RC1, especially in the
internal connectors. For a list of open bugs, see link at
http://www.restlet.org/about/roadmap
 
Your code looks right. For now, I suggest that you use client and server
connectors like Jetty/Simple or Net/Apache following the instructions here:
http://www.restlet.org/documentation/1.1/connectors
 
I've added your report in the comments of this bug report so it doesn't get
lost:
 
"Too many open files -> close socket in StreamServerHelper?"
http://restlet.tigris.org/issues/show_bug.cgi?id=514
Best regards,
Jerome

 

  _____  

De : Eric Lui [mailto:[EMAIL PROTECTED] 
Envoyé : jeudi 7 août 2008 04:42
À : [email protected]
Objet : release() method - doesn't appear to release connections?


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