Thierry,

The first thing I noticed in your code is that you are using the 
OutputRepresentation constructor that does not take an expectedSize argument, 
so I took that out and the exception goes away. At the moment my tests are 
still failing, so I'll look into that some more.

bjorn

On Apr 11, 2012, at 12:39 PM, Thierry Boileau wrote:

> Hi Bjorn,
> 
> I send you a sample test code (server + client) based on your code that works 
> for me. But I notice that my app sends only 15000 bytes... Can you tell us 
> the metrics of your tests?
> 
> Not 100% sure of the question.. do you mean container? I am not using 
> jetting. My initialization code looks like this:
>                        Component component = new Component();
>                        component.getServers().add(Protocol.HTTP, PORT);
>                        component.getDefaultHost().attach(new 
> com.xonami.rest.server.ApiApplication());
>                        component.start();
> 
> Is that what you wanted?
> I wanted to know if the application is served using some "server" extensions 
> such as jetty (org.restlet.ext.jetty.jar) or simple 
> (org.restlet.ext.simple.jar), or inside a servlet container. 
> 
> 
> also, in the code I sent it looks like it was not "hanging" but rather 
> pausing for a moment and then throwing this exception:
> 
> java.io.IOException: Timeout while writing to the queue-based output stream
>        at org.restlet.engine.io.PipeStream$2.write(PipeStream.java:106)
>        at java.io.OutputStream.write(OutputStream.java:99)
>        at 
> com.xonami.rest.server.media.RawMediaStateWithIdResource$1.write(RawMediaStateWithIdResource.java:158)
>        at org.restlet.engine.io.BioUtils$2.run(BioUtils.java:394)
>        at org.restlet.service.TaskService$1$1.run(TaskService.java:130)
>        at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>        at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>        at java.lang.Thread.run(Thread.java:680)
> 
> thanks, I try to reproduce this error. Or, if may ask you, can you provide a 
> reproductible sample test code?
> 
> Best regards,
> Thierry Boileau
>  
> -----------------------------
> Bjorn Roche
> http://www.xonami.com
> Audio Collaboration
> http://blog.bjornroche.com
> 
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2947368
> 
> <testRange.zip>

-----------------------------
Bjorn Roche
http://www.xonami.com
Audio Collaboration
http://blog.bjornroche.com

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2947381

Reply via email to