You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ne...@bt.com on 2005/04/21 18:16:18 UTC

Consecutive threads

Tomcat running stand-alone pretty much out-of-the box. 

I have a servlet which initially presents a form to users. When the form
is submitted it runs one of a number of possible queries on an Oracle
database. Some queries return immediately while others take up to 20
minutes to run. The servlet itself does nothing very time-consuming an
so consequently spends most of its time waiting for executeQuery to
return.

If I run a long query, followed by a series of short queries ( different
browsers/pcs ) then the latter all wait for the long query to return
rather than completing first as I expected.

Why are the threads apparently processed consecutively and where do I
need to look to change this behaviour?

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


Re: Consecutive threads

Posted by Kenneth Jensen <xm...@gmail.com>.
On 4/21/05, neil.shadrach@bt.com <ne...@bt.com> wrote:
 
> If I run a long query, followed by a series of short queries ( different
> browsers/pcs ) then the latter all wait for the long query to return
> rather than completing first as I expected.

A quick guess would be that your first query starts a transaction and
locks some DB-resources, and the following queries have to wait for
them to become unlocked.


---
Cheers,
Kenneth

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