On Apr 11, 2012, at 2:14 PM, Bjorn Roche wrote: > > On Apr 11, 2012, at 1:50 PM, Thierry Boileau wrote: > >> Hi Bjorn, >> >> that's right, I primarily use the restlet 2.1 version, which does not >> support this constructor I think. I'm not sure this has an impact. >> > > Well when I use the setter I get the same thing (throws exception) as when I > pass that value to the constructor. > > Also, it looks like the range is being ignored -- I am getting the full > document back rather than part. Can you send me build instructions (pom or > ant file?) for your code if you have it? I am testing with curl, maybe there > is an issue with one of our tests?
Sent you code to reproduce the bug off-list. > Finally, is it possible to avoid the range processing on just some calls for > greater efficiency? > > bjorn > >> Best regards, >> Thierry Boileau >> >> 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 >> >> >> >> >> > > ----------------------------- > Bjorn Roche > http://www.xonami.com > Audio Collaboration > http://blog.bjornroche.com > > > > ----------------------------- Bjorn Roche http://www.xonami.com Audio Collaboration http://blog.bjornroche.com ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2947446

