Could you show me some code?
-----Original Message-----
From: Tiana Zhang [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 05, 2000 9:47 AM
To: [EMAIL PROTECTED]
Subject: Synchronize method in the servlet
Hello,
The synchronized method I created in the servlet is going to increment a
number
in the database and display it in the browser. Because I don't want multiple
user update the database at same time, I added synchronized keyword in the
method.
My question is: does synchronize guarantee that only one thread does the
update
database? Why after many times of testing multiple browsers, I still got
same
number on different threads which means access to the synchronized method is
not
exclusive?
many thanks in advance.
Tiana
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html