Re: threads in tomcat

2005-06-16 Thread Wendy Smoak
From: "Daniel Molina (Inter-Media)" <[EMAIL PROTECTED]> > If I use threads, through the Thread class, how can I can finish them >whenever Tomcat reloads the application that created them. You can use a ServletContextListener which will be notified when the webapp starts and stops. Implement

RE: threads in tomcat

2005-06-16 Thread Robert Harper
You should hold a reference to your thread in your app. Set a flag that the thread watches to notify it that it is time to terminate. Place this code in the servlet's destroy() body. Calling the destroy() on the thread object is a little drastic because it will terminate the thread without calling

RE: Threads in Tomcat 5

2004-04-01 Thread Ralph Einfeldt
Tomcat uses a ThreadPool so Threads are recycled. If you store something in a ThreadLocal it it your resposibility to clear the stored values at the end of the use. So if you store request variables you have to clear them at the end of the request (or before storing them at the beginning of th

RE: Threads in Tomcat 5

2004-04-01 Thread Peter Lin
resources (usually pages) based on the product and the policy information. Each http session is related to an eRights session. Ross -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Thursday, April 01, 2004 12:26 PM To: Tomcat Users List Subject: RE: Threads in Tomcat 5

RE: Threads in Tomcat 5

2004-04-01 Thread Angelov, Rossen
ally pages) based on the product and the policy information. Each http session is related to an eRights session. Ross -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Thursday, April 01, 2004 12:26 PM To: Tomcat Users List Subject: RE: Threads in Tomcat 5 hit sen

RE: Threads in Tomcat 5

2004-04-01 Thread Peter Lin
Peter Lin [mailto:[EMAIL PROTECTED] Sent: Thursday, April 01, 2004 11:21 AM To: Tomcat Users List Subject: Re: Threads in Tomcat 5 why do you want to use a thread to manage authentication? given the requestProcessor threads are reused, it makes no sense to use the thread for the mapping. you're

RE: Threads in Tomcat 5

2004-04-01 Thread Peter Lin
nd now I'm trying move them to Tomcat but it looks like there will be lot of problems. Ross -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Thursday, April 01, 2004 11:21 AM To: Tomcat Users List Subject: Re: Threads in Tomcat 5 why do you want to us

RE: Threads in Tomcat 5

2004-04-01 Thread Angelov, Rossen
ginally created 2-3 years ago to work on iPlanet and now I'm trying move them to Tomcat but it looks like there will be lot of problems. Ross -Original Message- From: Peter Lin [mailto:[EMAIL PROTECTED] Sent: Thursday, April 01, 2004 11:21 AM To: Tomcat Users List Subject: Re:

Re: Threads in Tomcat 5

2004-04-01 Thread Peter Lin
why do you want to use a thread to manage authentication? given the requestProcessor threads are reused, it makes no sense to use the thread for the mapping. you're better off just authenticating the first time and setting the HttpSession, rather than look up the thread. I'm probably missing

RE: Threads in Tomcat 5

2004-04-01 Thread Shapira, Yoav
Hi, The same thread may be used for the container to handle multiple requests, though of course not concurrently. Any other behavior doesn't scale so it doesn't make sense ;) I suggest you change your login logic. As for docs, what you're really looking for is source code, which is of course av