Sorry.. misunderstood your original when you asked if there was a way to create a Thread by hand....
No tricks/shortcuts. Are you saying each request will take a minute to process and is triggered a few times an hour? I suspect the client is anxiously awaiting a response like "OK, I got it", but not patient enough for a "The request was successful." I'm still thinking a messaging system, especially if you want to requests to be processed regardless of the time the message was delivered, like, when maybe many requests hit near the same time. A quick hack on a messaging system is to simply have the servlet throw a record into a DB, file or something used as a messaging queue. Then, a program external to Tomcat simply monitors the queue, picks up any existing requests, handles them, and starts monitoring again. This way, Tomcat could go down without affecting if the messages are processed, or the monitor could be down without affecting if Tomcat can push in new requests. The only thing that can't go down is the queue. Joe -----Original Message----- From: David Balažic [mailto:xerc...@gmail.com] Sent: Monday, November 16, 2009 12:05 PM To: Tomcat Users List Subject: Re: Possible to do async processing? 2009/11/16 Joseph Morgan <joseph.mor...@ignitesales.com>: > Yes, there is a way, and I suspect you're doing "fire-and-forget" processing, > but, could you give us a better idea as to what you are trying to do? > > Tomcat will handle servlet requests in multiple threads if needed, anyway. > So it may not be necessary. I'm thinking you might want to investigate a > messaging system, such as OpenMQ. > > BTW: To create a thread by hand, look at the Java docs for the Thread class > and the Runnable interface. Keep in mind, this could get really out of hand > if there are a lot of requests and you don't understand how to properly > manage threads in this environment. Yes, that is why I ask. (I know how to create threads). So Tomcat has nothing like this in itself? Any trick , shortcut? It will be something triggered like a few times in an hour and would take less than a minute to process, to there should be no overload problems (famous last words...) Regards, David --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org