You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Nuno Rodrigues <co...@netcabo.pt> on 2006/11/16 13:24:16 UTC

How to start a Thread in the same JVM as Tomcat

Hello all,

 

I need to put a thread doing some processing in the same JVM as Tomcat. 

This thread will make some performance measurement inside the JVM and also
cause some Resource Exhaustion (CPU consumption, Memory Leaking, etc)
problems ( to simulate Fault-Injection).

I'm here to ask you where I should start this thread. I've just looked at
the source and I'm wondering if I should start that thread in the
org.apache.catalina.startup.Bootstrap class.

So, I'll wait for an answer from your side to give me this advice.

 

Best regards,

Nuno Rodrigues


Re: How to start a Thread in the same JVM as Tomcat

Posted by Yoav Shapira <yo...@apache.org>.
Why would you start it in an internal Tomcat class rather than any of
your own classes?  Just create a test webapp, and do whatever you want
in it.

Yoav

On 11/16/06, Nuno Rodrigues <co...@netcabo.pt> wrote:
> Hello all,
>
>
>
> I need to put a thread doing some processing in the same JVM as Tomcat.
>
> This thread will make some performance measurement inside the JVM and also
> cause some Resource Exhaustion (CPU consumption, Memory Leaking, etc)
> problems ( to simulate Fault-Injection).
>
> I'm here to ask you where I should start this thread. I've just looked at
> the source and I'm wondering if I should start that thread in the
> org.apache.catalina.startup.Bootstrap class.
>
> So, I'll wait for an answer from your side to give me this advice.
>
>
>
> Best regards,
>
> Nuno Rodrigues
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org