MBP wrote:
>
> I can't know what you're trying to implement, but in general a better
> solution would involve a list of events and a scheduler. The servlet would
> add an event to the list and then forget about it. The scheduler would scan
> the list every X seconds and handle any timed-out events.
> An added bonus is that you can restart your server without losing events.
The event list and scheduler are good ideas. Scanning the list every X
seconds is not very good. Better would be to put the scheduler into a
wait for the number of seconds until the next event. Notify the
scheduler when a new event is added so that it can add the new event and
adjust its wait time.
___________________________________________________________________________
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