> From: Meir Yanovich [mailto:[EMAIL PROTECTED]
> say i have multiple request coming from internet site that going via
> apache server tunneling the throw mod_jk to tomcat
> tomcat is processing the requests and builds java corba objects that
> invoked external api's that comes from external applications
> my question is
> so how does tomcat handle the invoking external api FROM tomcat web
> application to out side application

Tomcat does nothing special.  It maintains a thread pool.  It will call your 
code using whatever thread it happens to have assigned to the request.  That 
thread will be blocked, or not, depending on how your code uses the thread and 
whether the call you make is synchronous or asynchronous.

If you want different behaviour, you can create your own worker threads.  Read 
the Tomcat docs for restrictions on doing this - the most obvious one is that 
Tomcat isn't aware of your threads and won't shut them down when it tries to 
exit, so you need to handle this case or risk your JVM staying running after 
Tomcat shutdown.

> is there some kind of thread limit?

You can configure the size of Tomcat's thread pool in Tomcat's server.xml.

> is there any concurrency with threads limit?

If I understand you correctly, the only limits are those imposed by your 
virtual machine and the memory you can allocate to Java.  Each thread takes a 
significant amount of memory, notably for its stack, which I suspect* has to be 
allocated on thread creation.

                - Peter

* I've no doubt Chuck will correct me if I'm wrong - it's ten years since I 
last looked inside a virtual machine, and that was Smalltalk not Java!


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to