threads blocking on EncodeRepresentation

2007-10-16 Thread Jim Alateras
Hi, I am getting a whole lot of blocked threads when using the EncodeRepresentation class (shown below). Has anyone else experience such a problem Daemon Thread [Thread-108] (Suspended) Unsafe.park(boolean, long) line: not available [native method] LockSupport.park()

Re: EncodeRepresentation.write leaving blocked threads around?

2007-10-16 Thread Tim Peierls
In this case, as with a subsequent message from Jim Alateras, the problem appears to be that the representation size exceeds the capacity of the underlying pipe (1024), and no one is reading from the input stream side of the pipe. But who made these daemon threads? Mixing blocking data structures

Re: EncodeRepresentation.write leaving blocked threads around?

2007-10-16 Thread J. Matthew Pryor
The thread is created by the ByteUtils class in its getStream() method /** * Returns an input stream based on the given representation's content and * its write(OutputStream) method. Internally, it uses a writer thread and a * pipe stream. * * @return A stream

Re: Newbie question: How to stream data between RESTlets

2007-10-16 Thread xasima
Why no one goes further and proposes the concrete schema and classes for doing this? I really have no great knowledge in the area, so the following is just a some kind of expectation what we really need to do while elaborating such a system. Let we play with HTTP protocol and we have just the

Re: EncodeRepresentation.write leaving blocked threads around?

2007-10-16 Thread Tim Peierls
On 10/16/07, J. Matthew Pryor [EMAIL PROTECTED] wrote: The thread is created by the ByteUtils class in its getStream() method Yes, but what are you doing with the InputStream returned by getStream()? I suspect that you aren't reading this stream completely, so the writing thread blocks

RE: Issue using StatusService

2007-10-16 Thread Jerome Louvel
Hi Davide, Good suggestion, I've just updated the StatusService Javadocs in SVN. * Service to handle error statuses. If an exception is thrown within your * application or Restlet code, it will be intercepted by this service if it is * enabled. * * When an exception or an error is

RE: Cache-control header long term strategy

2007-10-16 Thread Jerome Louvel
Hi Rob, trunk sends the deprecation INFO message when setting Cache-control via the addAdditionalHeaders hack. The message indicates that the manual usage of this header is discourage (not deprecated). The Cache-control header setting is important for trying to interoperate with certain

Re: EncodeRepresentation.write leaving blocked threads around?

2007-10-16 Thread Jim Alateras
Matt, Interesting to see whether we get the same problem on Linux or whether it is specific to the mac. On windows, at least, i don't see any of these threads. You said in the email that the post actually completes but the thread doesn't terminate. Is this correct? cheers /jima J. Matthew

Re: Issue using StatusService

2007-10-16 Thread Davide Angelocola
On Tuesday 16 October 2007 20:43:33 Jerome Louvel wrote: Hi Davide, Good suggestion, I've just updated the StatusService Javadocs in SVN. thanks very much :-) -- -- Davide Angelocola

RE: HEAD not well supported?

2007-10-16 Thread Jerome Louvel
Hi all, Thanks for the quality of the feed-back. I feel like I'm now grasping all aspects of the problem and can propose a solution: 1) Split the Resource class into an abstract Handler class and a Resource subclass 2) Handler only works at the lower API level and specifies only the handle*()

Re: EncodeRepresentation.write leaving blocked threads around?

2007-10-16 Thread J. Matthew Pryor
None of this is code we are writing, its all internal to Restlet, all we are doing is calling EncodeRepresentation.getText() and that method call causes all the other stuff to happen. I can't see how our code has any impact on the closing of the stream and shutting down of the thread. It