I still am affected a lot by this issue. The application works fine but the tests, which runs against the same server in a short amount of time, always stop at some point with:
Jul 12, 2011 3:55:54 PM org.restlet.engine.http. connector.BaseHelper$1 rejectedExecution INFO: Worker service tasks: 0 queued, 10 active, 22 completed, 32 scheduled. Jul 12, 2011 3:55:54 PM org.restlet.engine.http.connector.BaseHelper$1 rejectedExecution INFO: Worker service thread pool: 1 core size, 10 largest size, 10 maximum size, 10 current size I've tried adding a call to Representation#release after any GET and POST but nothing changed. I am using httpclient extension and restlet 2.0.8. On Sun, Jan 2, 2011 at 11:46 PM, Tal Liron <tal.li...@threecrickets.com>wrote: > So, what do you think about this pseudo-code to demonstrate the use of > ClientResource? (My experience has shown this to hang applications...) > > function getText(url) { > var resource = new ClientResource(url) > var representation = resource.get() > if (representation) { > var text; > try { > text = representation.getText() > } > finally { > representation.exhaust() > } > return text > > } > } > > > On Sun, Jan 2, 2011 at 3:29 PM, Jerome Louvel > <jerome.lou...@noelios.com>wrote: > >> After further investigation of the source code, I rediscovered the main >> intent behind the Representation#release() method which is to provide a >> callback from the connectors to the representation that can be called when >> it has been fully written out, therefore allowing the release of associated >> resources such as database connections. >> >> Representations provided by the connectors themselves apparently don't >> rely on this method to be called as long as the content is fully read or >> exhausted, but it shouldn't hurt to call it systematically. >> >> I've revised the wiki page again as well as the Representation#release() >> Javadocs to further clarify those points. >> >> Best regards, >> Jerome >> >> ------------------------------------------------------ >> >> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2695526 >> > > -- Daniele Dellafiore http://danieledellafiore.net ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2791062