You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Самойлов Андрей Иванович <a....@bashtel.ru> on 2007/11/22 06:00:00 UTC
Recieving responses from another request
I use Tomcat v5.5.9, OS Windows 2003. On the Tomcat deployed a servlet, which executes a stored procedure on the Oracle database, then prints the result of execution into output stream:
StoredProcedure();
PrintWriter out = response.getWriter();
...
out.println(result);
out.close();
If a stored procedure executes too slowly (>1 hour), then a client recieves response from another request.
How to eliminate this?
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Recieving responses from another request
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Самойлов Андрей Иванович [mailto:a.samoylov@bashtel.ru]
> Subject: RE: Recieving responses from another request
>
> Each incoming request requires a thread for the duration of
> that request. How can occur, if the one thread suspended, the
> another thread is answers?
If the original thread has stored request-specifc information in a more globally scoped object (such as a session), that data is accessible to other threads processing other requests from the same session. The same problem can occur if your servlets or other application components use static fields.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Recieving responses from another request
Posted by Самойлов Андрей Иванович <a....@bashtel.ru>.
Each incoming request requires a thread for the duration of that request. How can occur, if the one thread suspended, the another thread is answers?
Where defines the maximal timeout waiting of responses?
-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org]
Sent: Friday, November 23, 2007 4:49 AM
To: Tomcat Users List
Subject: Re: Recieving responses from another request
Самойлов Андрей Иванович wrote:
> I use Tomcat v5.5.9, OS Windows 2003. On the Tomcat deployed a servlet, which executes a stored procedure on the Oracle database, then prints the result of execution into output stream:
>
> StoredProcedure();
>
> PrintWriter out = response.getWriter(); ...
> out.println(result);
> out.close();
>
> If a stored procedure executes too slowly (>1 hour), then a client recieves response from another request.
> How to eliminate this?
This might be a Tomcat issue. Upgrade to 5.5.25 to be sure.
More likely, this is a problem with your code. You need to check that it is thread-safe.
Mark
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Recieving responses from another request
Posted by Mark Thomas <ma...@apache.org>.
Самойлов Андрей Иванович wrote:
> I use Tomcat v5.5.9, OS Windows 2003. On the Tomcat deployed a servlet, which executes a stored procedure on the Oracle database, then prints the result of execution into output stream:
>
> StoredProcedure();
>
> PrintWriter out = response.getWriter();
> ...
> out.println(result);
> out.close();
>
> If a stored procedure executes too slowly (>1 hour), then a client recieves response from another request.
> How to eliminate this?
This might be a Tomcat issue. Upgrade to 5.5.25 to be sure.
More likely, this is a problem with your code. You need to check that it is
thread-safe.
Mark
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org