Solved

How to wait on a servlet or non threaded app?

Posted on 2002-04-19
4
150 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
Comment Utility
Thread.currentThread().sleep(long);
0
 
LVL 16

Expert Comment

by:heyhey_
Comment Utility
usually
Thread.sleep(long);
is enough :)
0
 

Author Comment

by:tims
Comment Utility
Perfect.  Thanks.
0
 
LVL 16

Expert Comment

by:heyhey_
Comment Utility
> 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
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 how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now