W3C home > Mailing lists > Public > www-jigsaw@w3.org > March to April 2000

Syncronized for Thread Safe servlets

From: Walter do Valle <walter@softplan.com.br>
Date: Mon, 20 Mar 2000 17:56:40 +0000
Message-ID: <38D66658.F96D9EFA@softplan.com.br>
To: www-jigsaw@w3.org

Dear friends

I am developing a servlet application that accesses a DB2 database. My
web server is Jigsaw. I am trying to synchronize my aplication. Then I
have declared my doGet method as "syncronized". It works, but JigSaw is
putting my   requests in waiting. If I request one connection, Jigsaw
responds very fast. But if I make more than one connection at same time
from diferent machines, it puts all my requests in a WWW (world wide
wait) :-). It's a very large wait!

In the database appears only one connection! Why?

What can I syncronize my application to avoid this long wait? What parts
from my program must be in a sunchronized block? What variables
(members) i need to synchronize?

Thanks for any help

P.S.: I don't want to use SingleThreadModel.
Received on Monday, 20 March 2000 15:58:57 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:14:07 UTC