You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by xa...@freemail.gr on 2009/05/27 15:21:04 UTC
tomcat connector manipulation
Hi,
i am writing java web services - tomcat - axis1.4
i set two connectors on tomcat 6.
I want some clients (high priority) to arrive at the 1st
and some clients(low priority) to arrive at the 2nd connector(different port).
What i want to achieve is to serve first the clients(to a web service) that have high priority and then the clients that have slow priority.
Is there a way to be able to handle at first the one connector(high prior.) and then the other one?
Or this idea of using different connectors is wrong?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: RE: tomcat connector manipulation
Posted by xa...@freemail.gr.
Thanks for the advice chuck.
I am changing i bit the question. Can i monitor requests to a web service in a queue of my own that will keep which clients are trying to hit a web service and pass through a connector? If so, how can i implement that queue(what to keep inside it) and where should i put it(in Tomcat or
somewhere else)?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Three tomcat instances
Posted by Lawrence Lamprecht <ll...@quadrem.com>.
If you want to run 3 tomcats then you need to have 3 tomcat installations. One tomcat per instance that you want to have server, this in turn will mean that you will have 3 separate server.xml files.
You can then load balance the 3 tomcats to be referenced as required.
You can even create workers for each instance and then not loadbalance. Call exach required worker as you need it directly.
Kind regards / Met vriendelijke groet,
Lawrence Lamprecht
-----Original Message-----
From: xaliasos@freemail.gr [mailto:xaliasos@freemail.gr]
Sent: Wednesday, June 03, 2009 9:54 AM
To: users@tomcat.apache.org
Subject: Three tomcat instances
I write a java web service and depending on a result i want it to call
other web service (http://localhost:80/axis/serv.jws).
But, i want serv.jws to be handled by three different servers depending
on where i want to send it.
How can i run three tomcats simultaneously?I read the server documentation,but mentions that only one server i can set into server.xml
Any help appreciated.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Three tomcat instances
Posted by Peter Crowther <Pe...@melandra.com>.
You don't tell us which version of Tomcat you're running, so it's hard to point you to the correct docs for your version on the Web. However, if memory serves, look at the file RUNNING.txt in your Tomcat directory. There's a section in there about setting up multiple Tomcats on the same machine.
- Peter
> -----Original Message-----
> From: xaliasos@freemail.gr [mailto:xaliasos@freemail.gr]
> Sent: 03 June 2009 08:54
> To: users@tomcat.apache.org
> Subject: Three tomcat instances
>
>
> I write a java web service and depending on a result i want it to call
> other web service (http://localhost:80/axis/serv.jws).
> But, i want serv.jws to be handled by three different servers
> depending
> on where i want to send it.
> How can i run three tomcats simultaneously?I read the server
> documentation,but mentions that only one server i can set
> into server.xml
>
> Any help appreciated.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Three tomcat instances
Posted by xa...@freemail.gr.
I write a java web service and depending on a result i want it to call
other web service (http://localhost:80/axis/serv.jws).
But, i want serv.jws to be handled by three different servers depending
on where i want to send it.
How can i run three tomcats simultaneously?I read the server documentation,but mentions that only one server i can set into server.xml
Any help appreciated.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: tomcat connector manipulation
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Chuck,
On 5/27/2009 6:14 PM, Caldarale, Charles R wrote:
>> From: xaliasos@freemail.gr [mailto:xaliasos@freemail.gr] Subject:
>> tomcat connector manipulation
>>
>> Is there a way to be able to handle at first the one connector
>> ( (high prior.) and then the other one?
>
> Nothing I can think of currently in Tomcat or the servlet spec would
> help here. You could write a Valve for the <Engine> or <Host> that
> gets called early in the processing chain to invoke
> Thread.setPriority() with a value appropriate to the request; how
> much effect this will have is hard to say.
Not necessary: use an executor with "threadPriority" set.
http://tomcat.apache.org/tomcat-6.0-doc/config/executor.html
My advice would be to set up two connectors (as the OP suggested) and
use two different executors: one with priority set higher and the other,
lower. I would also give the high-priority connector more connections in
its pool, while the lower-priority one gets fewer. You might even want
to go further and use two different database connection pools, with the
higher-priority clients having a larger pool than the lower-priority ones.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkopRncACgkQ9CaO5/Lv0PByrQCgwxboJ92co6RsfcsNsSDXCrQD
STUAniExal0b6+A2Sfh6nEZRciAMCgiK
=ci2J
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: tomcat connector manipulation
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: xaliasos@freemail.gr [mailto:xaliasos@freemail.gr]
> Subject: tomcat connector manipulation
>
> Is there a way to be able to handle at first the one connector
( (high prior.) and then the other one?
Nothing I can think of currently in Tomcat or the servlet spec would help here. You could write a Valve for the <Engine> or <Host> that gets called early in the processing chain to invoke Thread.setPriority() with a value appropriate to the request; how much effect this will have is hard to say.
Unless your webapp has a bottleneck somewhere, prioritizing on any basis might not be visible at all. If you do have a bottleneck, you could put in some code at that queuing point to give preferential treatment to the high priority requests.
- 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 unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org