You must write the daemon thread in a normal java file. You can use
java.util.Timer class to wake up at a defined interval so as to send emails.

Normally web server provides a way to start some of our code as it starts.
When we register servlets there we can define whether it shud run at the
start of server or not. If yout Jaguar CTS 4.0 web server provides that then
create a servlet and in the init method call your java method where you have
defined the timer code. It will work for you.

-----Original Message-----
From: Emmanuel Eze [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 03, 2002 6:34 AM
To: [EMAIL PROTECTED]
Subject: Daemon Thread


Hi All,

I need to develop a daemon thread that wakes up at a defined interval to
send email based on some conditions. My web application is purely written in
JSP.

I am trying to choose between writing the daemon as a Servlet or a Java
Application.  I need to get this daemon running as soon as the web server is
started. My web server is Jaguar CTS 4.0 from Sybase.

Can somebody pls advise me on whether to use servlet/java application?  Pls
I'd like to know how I can get the daemon to start with the web server.

Thanks

Emma

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set
JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com


"The information in this e-mail, and any attachment therein, is
confidential and for use by the addressee only. If you are not the
intended recipient, please return the e-mail to the sender and delete
it from your computer. Although The Bank of New York attempts to
sweep e-mail and attachments for viruses, it does not guarantee that
either are virus-free and accepts no liability for any damage sustained
as a result of viruses."

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to