Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

handling event in Tomcat

1 view
Skip to first unread message

Stephen

unread,
Sep 9, 2004, 2:27:44 PM9/9/04
to
Hi,

I am using Servlet and Tomcat to build a web application. I understand
that whenever there is a http request, a Servlet thread is created to
handle it. However, I want to have my own scheduler to handler those
event. Basically, I want to queue all the incoming http request, and
execute as my order. Any advice on how to do that?

I will appreciate any response. Thank you.

Stephen

Nathan Zumwalt

unread,
Sep 11, 2004, 11:39:56 AM9/11/04
to
Actually, Tomcat creates a pool of "worker" threads that process
incoming requests. Each request doesn't get its "own" thread.

I don't think there is any way you can do what you're talking about
with Tomcat... you're asking to fundamentally change the way it
processes requests. If you don't like the way it does this, you'll
probably have to write your own server (which really isn't that hard).

You could create a singleton class with an associated thread, and pass
all incoming requests to that singleton... you'd still have Tomcat
creating threads, but you'd be able to better control how the requests
were processed.

I'd look at the design for your web application, though... this sounds
like a weird requirement to me.

//Nathan

usg...@hotmail.com (Stephen) wrote in message news:<597976d1.04090...@posting.google.com>...

0 new messages