tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wesley Acheson <>
Subject How to spwan child processes.
Date Mon, 23 Aug 2010 14:11:14 GMT

As far as I'm aware your not supposed to extend Thread in JEE. I've
seen similar questions on Stack Overflow where it was suggested you
may use your containers Thread pool. This sounds like a terrible idea
for portability.

So take the following example.

1 A request for something specific is made to tomcat. That specific
request needs to two actions.
2 Process the users request.
3 Notify another application over http

Now If the notification fails in step 3 the users request still needs
to process and not to error so we would like to send the notification
as a background task.  This is pretty easy with Threads but we
shouldn't extend Thread according to the specifications.

1 Should this be delegated to the container?
2 If it should be delegated to the container how would I/we achieve
this in tomcat 6.
3 If it shouldn't be delegated to the container where should I ask how
to achieve a background task, because it isn't a tomcat question.
(Disclaimer: If you really want to give me the answer I won't mind :P



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message