users@glassfish.java.net

Servlet thread priorty

From: <forums_at_java.net>
Date: Fri, 22 Apr 2011 16:21:10 -0500 (CDT)

Hi,

I posted a related question on metro's forum and didn't get an answer so
maybe this is a glassfish question.

If a servlet is accessed concurrently by multiple clients, in what order are
the requests serviced? And once a thread is assigned to service a request, is
there any guarantee that the thread will be allowed to complete before it is
put into a non - running state, at which point another servlet request will
be serviced before the first thread is put back into a running state?

If I wanted to write a servlet or webservice that processed messages in the
order they were received (WS-ReliableMessaging guarnatees delievery of client
messages to the service in order), it is true that message is dispatched to
the service in order, but is there guarntee that the thread processing the
message will be allowed to complete?

Even if all my service did was to place the request onto the queue such that
the long processing is done at a later time, isn't it possible for the thread
to be placed in a non-active state before it finishes, and thus the requests
on the queue would not be in the correct order?

 

 

 


--
[Message sent by forum member 'Mhui']
View Post: http://forums.java.net/node/794815