You could put a flag in a Singleton or in ServletContext that the thread
checks each time it runs. If the flag is set, the thread dies.
You would then have another servlet to set the flag to true.
Jack Wang wrote:
>
> Hi,all,
>
> I have a timed servlet run in ISP machine in which JRUN is installed. The
> timed servlet will run automatically every 2 hours. My servlet is developed
> with Matt Tucker's CoolServlets.com's maintenanceThread.
>
> The servlet can be stoped by stopping JRUN, but JRUN is the service of ISP,
> which is not controlled by me. Now my question is how can I stop or control
> my timed servlet?
>
> Thanks.
>
> Jack.w
>
> ___________________________________________________________________________
> 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