Solved

Apache Tomecat 5.5 threading Question

Posted on 2007-03-28
1
205 Views
Last Modified: 2010-03-17
I am new to Apache Tomcat and want to make sure that I understand the threading model used by relase 5.5 and 6.0.

Here is a little background on the current design that I have and the concerns that I have.  

What I am attempting to do is build a dispatcher servlet that will forward the HTTP request to a servlet or a JSP page that contains the logic to complete the request.  Most of the servlets will need to contact remote web resources before a response can be generated by to the user.  These remote web resources may be busy or down thus causing the servlet that is handling the request to block.  Since I am not that familiar with Tomcat I do not know how this will be handled.  If another use sends a request into the Tomcat server will the Application Server generate another instance of the Java Dispatcher class or will the request get blocked until first request completes.  Also, does the forwarding of a request to another servlet free the forwarding servlet up to process more requests.

Sorry if these questions/concerns seem basic, but since I am new to Tomcat and Servlets I want to make sure that I understand what is happening under the covers.  This could affect my design and implementation.  I would prefer to figure that out before I get any further in my design and implemenation.
0
Comment
Question by:traemak
1 Comment
 
LVL 30

Accepted Solution

by:
Mayank S earned 250 total points
ID: 18808983
>> I am not that familiar with Tomcat I do not know how this will be handled.

That's fine - the threads will remain blocked until the operation is completed.

>> If another use sends a request into the Tomcat server will the Application Server generate another instance of the Java Dispatcher class or will the request get blocked until first request completes.  

It will be handled by the same servlet in another thread, unless your servlet implements the SingleThreadModel interface.

>> Also, does the forwarding of a request to another servlet free the forwarding servlet up to process more requests.

Same as my answer to the previous. Servlets can be multi-threaded.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now