A pretty simple way of doing this is to have your context init create a
background thread. Have the background thread monitor a queue for jobs.
Then, have the servlet place the job in the queue.

The background thread can either process the job itself, or create a worker
thread to process the job.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
 

> -----Original Message-----
> From: David Balažic [mailto:xerc...@gmail.com]
> Sent: Monday, November 16, 2009 10:44 AM
> To: Tomcat Users List
> Subject: Possible to do async processing?
> 
> Hi!
> 
> We are using tomcat 6.0 and now we have the need to trigger from the
> service() method of a  servlet.
> 
> So:
>  - a request arrives
>  - the servlet triggers an async event
>  - servlet sends response and closes
>  - the async task is done (independent of servlet opeartion)
> 
> Is there a way to do this?
> 
> Or create threads by hand?
> 
> Regards,
> David
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to