Re: Do we have any control on Tomcat threads?

2003-07-14 Thread Jason Coleman
yes i believe you can.

Tomcat uses multithreading... so you can make it so only 1 thread can access
certain code at once.. using synchronized blocks of code

I think you can do what you want, although im no expert on threads. Best to
look up google for some example code


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Do we have any control on Tomcat threads?

2003-07-14 Thread Tim Funk
Nope. Rethink your design. There is a thread pool which can serve a request 
for any resource (read: jsp or servlet) in any webapp.

In a servlet environment  - you should avoid creating threads yourself since 
you have a high *chance* at concurrency issues.

[
There was a recent thread in tomcat-dev about being able to kill threads 
through JVM magic (my choice of words). I can't state how credible the 
solution is, I can just say the topic was proposed. But if the soln is 
correct - could be helpful for killing inifite loops.
]

-Tim

Agarwal, Naresh wrote:
Hi
 
Web apps in tomcat run in threads spawned by Tomcat. Do we have any control on these threads?
 
I want to perform some Init and UnInit operations at the time creation and destruction of these threads. Is it possible to do with Tomcat threads?
 
thanks  regards,
Naresh Agarwal



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Do we have any control on Tomcat threads?

2003-07-14 Thread Bill Barker
In the Servlet 2.4-Spec (aka Tomcat 5.x), the RequestListeners come very
close to what you probably want.  Otherwise, the answer is no.

Agarwal, Naresh [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi

Web apps in tomcat run in threads spawned by Tomcat. Do we have any control
on these threads?

I want to perform some Init and UnInit operations at the time creation and
destruction of these threads. Is it possible to do with Tomcat threads?

thanks  regards,
Naresh Agarwal





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]