Huh, I don't know if managing your own Thread is recommended by container. Is there another way around this? Like JMX or implement the service action and have a Demom periodically ping that service action to execute the intense action?
-danny Danny Trieu Internet Business Group Downey Savings and Loan Association, F.A. [EMAIL PROTECTED] (949) 509-4564 "The beginning of knowledge is the discovery of something we do not understand." - Frank Herbert (1920-1986) "The essence of knowledge is, having it, to apply it; not having it, to confess your ignorance." - Confucius (551-479 BC) -----Original Message----- From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 09, 2003 10:32 PM To: Struts Users Mailing List Subject: Re: PlugIn Scheduler hi ALl It worked perfectly fine. Soon i will be posting the code for all of the buddies so that they can use it into there application. ----- Original Message ----- From: "Gurpreet Dhanoa" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Wednesday, December 10, 2003 11:24 AM Subject: PlugIn Scheduler hi I have created the following plug-in and using it into my application. The problem which I am facing is when I am running tomcat. The plug -in is not starting. The basic idea behind this plugin is to start a thread and peform some logic after some interval of time. ANy suggestions will be of great help. Following is the code for Plugin Class and the struts-config.xml PlugTest.java package efit; import java.io.PrintStream; import javax.servlet.ServletException; import org.apache.struts.action.ActionServlet; import org.apache.struts.action.PlugIn; import org.apache.struts.config.ApplicationConfig; public class PluginTest implements PlugIn, Runnable { public PluginTest() { t = null; } public void init(ActionServlet servlet, ApplicationConfig applicationConfig) throws ServletException { System.out.println("The Plugin is starting"); t = new Thread(this); t.start(); } public void destroy() { System.err.println("\u2212\u2212\u2212\u2212>The Plugin is stopping<\u2212\u2212\u2212\u2212"); } public void run() { do { System.out.println("Plugin is Running"); try { Thread.sleep(1000L); } catch(Exception t) { System.out.println("Exception in Thread" + t.getMessage()); } } while(true); } Thread t; } in the Struts-config.xml I m using the plugin usiong the following tag <plug-in className="efit.PluginTest"/> Thanks Gary --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message and any attachments are for the intended recipient(s) only and may contain privileged, confidential and/or proprietary information about Downey Savings or its customers, which Downey Savings does not intend to disclose to the public. If you received this message by mistake, please notify the sender by reply e-mail and delete the message and attachments. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

