David Balažic wrote:
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?

Hi.
I am not the greatest Java or Tomcat guru here, so I do not even know if Java allows you to start an external (think OS-level) task to do something.
But on the face of it, I would think of this kind of scheme :
- a separate daemon is running, whose job it is to execute these async tasks. That one listens on some port, and accepts only requests coming from your webapp. - you applet connects to that external server via TCP, sends it the request, gets an acknowledgement for the receipt of the request, and then proceeds to answer the client.

Almost any introductory book on network programming, in any programming language, will have examples of how to create a TCP server program.
Even in Java, I would think.

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

Reply via email to