Ben,
I have just completed a project which allows users to query certain stock
quote information. Rather than perform the query every time I get a request,
I start a background thread in the init() method of the servlet which
queries the Wall Street server every 15 minutes and builds a set of
stockQuote objects. In the doGet() method of the servlet a simple
StockThread.getQuotes() method is called to do a synchronized read of the
quote Hashtable. It has worked quite well and makes for a very low resource
load application.
----- Original Message -----
From: Ben Coppin <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 20, 1999 5:03 AM
Subject: Using servlets for periodic background processes
> Has anyone investigated the use of servlets to carry out periodic tasks? I
> have a servlet through which users can select topics on which they want to
> be emailed regularly. I was thinking that it might be neat if instead of
> using cron to do this, I had a separate thread in the servlet, or perhaps
a
> separate servlet periodically wake up and send out emails and then go back
> to sleep.
>
> Does this sound like a daft idea, or has someone out there already done
> something like this?
>
> Thanks,
>
> Ben
>
>
___________________________________________________________________________
> 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
>
___________________________________________________________________________
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