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
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
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
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
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
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
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
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:
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
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
10 matches
Mail list logo