Solved

How to wait on a servlet or non threaded app?

Posted on 2002-04-19
4
156 Views
Last Modified: 2013-11-24
I would like to use an equivalent of the wait(long) method used by threads but it is a servlet.  I don't really want to create a thread just for this since it brings in all the servlet/thread problems.

Do anyone know of a reliable method for sleeping/waiting for a given number of millimeconds?

Thanks.
0
Comment
Question by:tims
  • 2
4 Comments
 
LVL 9

Accepted Solution

by:
Venci75 earned 50 total points
ID: 6953304
Thread.currentThread().sleep(long);
0
 
LVL 16

Expert Comment

by:heyhey_
ID: 6953359
usually
Thread.sleep(long);
is enough :)
0
 

Author Comment

by:tims
ID: 6953938
Perfect.  Thanks.
0
 
LVL 16

Expert Comment

by:heyhey_
ID: 6953967
> I would like to use an equivalent of the wait(long) method used by threads but it is a servlet

btw. your questions shows that you do not have the slightest idea what wait() / notify() are designed for. take a look at some tutorial on Java synchronization.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
github account with ecipse 1 47
split string containing \r\n in Java 46 43
HTTPSessionBindingListernter not configured in deployment descriptor 2 53
String array comparison 4 33
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question