How to add the class to the tomcat , so that it runs on its own
Dear All Gurus, We need to make one utility class which needs to run on its own in the tomcat.We donot want to make it as servlet or so. Is there any way with which we can do that ? Please let me know ... Thanks in advance. Rahul __ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to add the class to the tomcat , so that it runs on its own
Howdy, >Sale Rahul wrote: >> Dear All Gurus, >> We need to make one utility class which needs to run >> on its own in the tomcat.We donot want to make it as >> servlet or so. >> Is there any way with which we can do that ? public class MyClass implements Runnable { public void run() { // Do whatever } } public class MyListener implements ServletContextListener { public void contextInitialized(ServletContextEvent sce) { Thread t = new Thread(new MyClass()); t.setDaemon(true); t.start(); } } And in web.xml, MyListener ? Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to add the class to the tomcat , so that it runs on its own
Hi! Sale Rahul wrote: Dear All Gurus, We need to make one utility class which needs to run on its own in the tomcat.We donot want to make it as servlet or so. Is there any way with which we can do that ? might... But it is very hard to advise you with so little information. What purpose is this class you speak of? How is it supporsed to be used by other parts if the application? What external ressources does the class need? What pieces of application state information does it need access to? Perhaps you could elaborate a little further on this? Phil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to add the class to the tomcat , so that it runs on its own
Hello Philipp, Trying to answer your questions : #1.What purpose is this class you speak of? -- Purpose is to clean send emails with some interval of time. #2.What external ressources does the class need? -- This class need mail.session. #3.What pieces of application state information does it need access to? -- This application need to access the database. Hope this clarify your queries. With Warm Regs Rahul --- Philipp Taprogge <[EMAIL PROTECTED]> wrote: > Hi! > > Sale Rahul wrote: > > Dear All Gurus, > > We need to make one utility class which needs to > run > > on its own in the tomcat.We donot want to make it > as > > servlet or so. > > Is there any way with which we can do that ? > > might... > But it is very hard to advise you with so little > information. What purpose is this class you speak of? How is it > supporsed to be used by > other parts if the application? What external > ressources does the class need? What pieces of application state information does it need access to? > > Perhaps you could elaborate a little further on > this? > > Phil > > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to add the class to the tomcat , so that it runs on its own
I also want to run some thing like this, The class will maintain a status and reply to health check pings. If you get any thing on this please do let me know also. regards Pankaj Sale Rahul <[EMAIL PROTECTED]> on 02/20/2004 07:22:39 PM Please respond to "Tomcat Users List" <[EMAIL PROTECTED]> To:[EMAIL PROTECTED] cc: Subject: How to add the class to the tomcat , so that it runs on its own Dear All Gurus, We need to make one utility class which needs to run on its own in the tomcat.We donot want to make it as servlet or so. Is there any way with which we can do that ? Please let me know ... Thanks in advance. Rahul __ Do you Yahoo!? Yahoo! Mail SpamGuard - Read only the mail you want. http://antispam.yahoo.com/tools - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]