Yes, I am working on a Mac.  Thanks for the pointer to this bug id. My
multi-threaded request seems to work otherwise.  I'm using
ExecutorCompletionService and ThreadPoolExecutor from the Java
Concurrency package.

And nice work on the Restlet framework, I was able to get something up
and going in just a couple of days.

Marc

On Thu, Jan 14, 2010 at 2:53 AM, Thierry Boileau
<thierry.boil...@noelios.com> wrote:
> Hi Marc,
>
>>So, my first question is whether Restlet supports the ability to write
>> multi-threaded representation methods in a ServerResource?
> I think so. You may be aware that each incoming request is handled by a
> brand new instance of the ServerResource class.
>
>>I ask, because I've tried it and it partially works, but I also see an
>> exception:
>
> Are you working on a Mac?
> If so, this is not an error message (see
> http://restlet.tigris.org/issues/show_bug.cgi?id=927).
> The current snapshot does not show this trace.
>
> Best regards,
> Thierry Boileau
>
> I'm creating a web service, which aggregates data from multiple calls
> to an external servers (these calls are done over RMI through a 3rd
> party library).  I'd lke to use a pool of threads from the Java
> Concurrent library to make multiple requests at once.
>
> So, my first question is whether Restlet supports the ability to write
> multi-threaded representation methods in a ServerResource?
>
> I ask, because I've tried it and it partially works, but I also see an
> exception:
>
> Jan 13, 2010 11:26:47 AM org.restlet.engine.http.StreamServerCall complete
> WARNING: Unable to shutdown server socket
> java.net.SocketException: Socket is not connected
>       at sun.nio.ch.SocketChannelImpl.shutdown(Native Method)
>       at 
> sun.nio.ch.SocketChannelImpl.shutdownInput(SocketChannelImpl.java:640)
>       at sun.nio.ch.SocketAdaptor.shutdownInput(SocketAdaptor.java:360)
>       at
> org.restlet.engine.http.StreamServerCall.complete(StreamServerCall.java:108)
>       at
> org.restlet.engine.http.HttpServerAdapter.commit(HttpServerAdapter.java:478)
>       at
> org.restlet.engine.http.HttpServerHelper.handle(HttpServerHelper.java:150)
>       at
> org.restlet.engine.http.StreamServerHelper$ConnectionHandler.run(StreamServerHelper.java:89)
>       at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>       at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>       at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>       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:637)
>
> I'm not sure what this exception is telling me.  I'd appreciate it if
> anyone could shed some light on the meaning of this exception.
>
> Marc
>
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2437120
>
>

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

Reply via email to