Hi, >Really I nead the thread to be up the lifetime of Tomcat No, you don't: at most you need the thread to be up for the lifetime of your webapp. If you really need it to be up for the lifetime of tomcat, that's pretty terrible design.
>because I know MyServlet will be loaded when Tomcat is. This seems to work >but is kind of "goofy" because the thread does not have a direct >relationship with the servlet it's just the only place I know to kick it >off. Is there a better (or atleast more natural) place to start this >thread? Yes, there is: a ServletContextListener's contextInitialized method to start your thread, and contextDestroyed method to close and shutdown your thread. These types of things are exactly what ServletContextListeners were designed for. Yoav 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]
