Hello list
I'm needing to wait or sleep or yield during the service method.
However, whenever I put a wait() in the middle of the service method,
it seems that the transaction is interrupted and the browser receives an
empty document. It appears to me that the service method was abandoned.
Why do I need to do that ? Because the response is being provided by
someone else, via a text file. So the servlet enters into a loop where it will
wait for the existence of such a text file. If I don't signal the system that
the servlet is idle, it will consume so much CPU that the benefits of
migrating from CGI to SERVLET as simply gone. This problem spoils all the
advantages I could have from the migration.
I also checked this mailing list archives and it was said before
that this is impossible to do.
As I can't believe it, I'm posting the question again.
So,
Is there a way to sleep during the service (method) ?
Could I use an external call to do that, say, a C program ? Would
that be acceptable (I'd prefer to do it natively, I mean, inside Java itself).
Thanks for any kind of colaboration !
Obrigado/Thanks a lot,
Jose Adriano Baltieri
Analista de Sistemas
CPD - CENTRO
UNIMEP - Universidade Metodista de Piracicaba
PIRACICABA - SP - BRASIL
Fone : 055 019 430-1858 (english spoken)
Fax : 055 019 430-1898 (Caixa Postal 42778)
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html