-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dikan
Dikan Xing wrote: | When two (almost) concurrent requests to the SAME servlet occurs (for | example, I type the same url in two individual browser window), I | find that Tomcat seems not to work on the second request until the | first is done. This indicates a resource under contention. Are you using a database connection pool with only one connection in the pool? Or perhaps another pooled resource with only a single resource to share? Also check for synchronized blocks of code that may be interfering with each other. | However, in my situtaion, my servlet should wait for some other | resources to respond. Those resources are quick-responded, but | transimssion of requests to & responses from those resources cost | much time. Therefore, if the servlet could be run (service method be | called) immediately instead of the previous is done, the total | response time could be reduced. Could you be a little more specific? What resources do you need to wait for, and why it is that sometimes you don't necessarily have to wait? Tomcat does not impose any prerequisites before calling the service methods of your servlet that should be waiting around for anything. | My servlet usually responds in about 15 seconds. My user accepts this | amount of time, but not 60 seconds. When 5 requests almost | concurrently occur, currently, the last response will not be | available until 15*5=75 seconds elapses. This is terrible.... I think you have some resource contention that needs to be fixed before you resort to any asynchronous solutions. | Is there any option in Tomcat so that I can configurate it to call | the same servlet service method (doGet, doPost) simultanously instead | of one by one? The only Servlet API-related thing here would be using the SingleThreadModel interface for your servlet. Are you using that? - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkgOA9kACgkQ9CaO5/Lv0PA3mwCgoDZULGD6PmRlH7WRvqXQ3I5/ xAcAnjtxZdLA+d8VPSHmQQpo/ZrV5ROr =Oqg/ -----END PGP SIGNATURE----- --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]