You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Marco Caldirola <ca...@yahoo.it> on 2008/01/04 12:12:58 UTC
fifo queue
Hi,
I need to create on my tomcat 6.0 server a fifo queue of my http requests.
I want to process a single request at a time.
Do you have an idea?
Thanks in advance.
Marco
___________________________________
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html
Re: fifo queue
Posted by David Delbecq <de...@oma.be>.
Reduce the max http request threads to 1.
However,
1) the admin request will be queued like user ones
2) it's not a fifo, the socket that are served, one at a time, by http
thread are, i think, in the same order as the thread get notified by jvm
En l'instant précis du 04/01/08 12:12, Marco Caldirola s'exprimait en
ces termes:
> Hi,
> I need to create on my tomcat 6.0 server a fifo queue of my http requests.
> I want to process a single request at a time.
> Do you have an idea?
> Thanks in advance.
> Marco
>
>
>
>
> ___________________________________
> L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html
>
--
http://www.devlog.be (a belgian developer's logs)
---------------------------------------------------------------------
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: fifo queue
Posted by ben short <ja...@gmail.com>.
Add something like the following to your servlet
synchronized ( someObject )
{
do work
}
But you'll need to be careful, as requests will block and clients
might time out if you are performing lengthy operations inside the
synchronized block.
On Jan 4, 2008 11:12 AM, Marco Caldirola <ca...@yahoo.it> wrote:
> Hi,
> I need to create on my tomcat 6.0 server a fifo queue of my http requests.
> I want to process a single request at a time.
> Do you have an idea?
> Thanks in advance.
> Marco
>
>
>
>
> ___________________________________
> L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html
---------------------------------------------------------------------
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: fifo queue
Posted by Mikolaj Rydzewski <mi...@ceti.pl>.
Marco Caldirola wrote:
> I need to create on my tomcat 6.0 server a fifo queue of my http requests.
> I want to process a single request at a time.
> Do you have an idea?
>
Change your idea. Do you really need such a nasty hack?
Use command pattern. Process requests as usual, create Command objects
and insert them into any queue you want.
--
Mikolaj Rydzewski <mi...@ceti.pl>