Yes, but since a servlet is an in-and-out type of environment (rather than running the way an executable program does), the thread would either have to run quickly enough to make the need for a thread questionable or the thread would have to be stored in a non-volatile part of the class. For a long-running process, it's often better to run the process as a separate server task and have the servlet queue requests / get responses from there (JMS is a good way to do this). That way you don't bog down the servlet mechanism.
Customer surveys are for companies who didn't pay proper attention to begin with.
Angela Poynton
Ranch Hand
Joined: Mar 02, 2000
Posts: 3143
posted
0
dluckose, your user name does not comply to the naming standards you agreed to when you registered here http://www.javaranch.com/name.jsp . please register again with a valid user name consisting of a first name, and a last name. Thank you.
Pounding at a thick stone wall won't move it, sometimes, you need to step back to see the way around.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.