On 16/11/2009 18:19, George Sexton wrote:
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.
As George says, create a queue. The Java 6 concurrency package is your
friend here.
java.util.concurrent.Executors
java.util.concurrent.ExecutorService
Tomcat doesn't have any built-in functionality for this.
p
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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org