"Srini Sathya." wrote:
>
> The reason I think I have to put static keyword for the method is because my
> method is going to update the database by JDBC connection. I don't want
> multiple thread updating the database at the same time.
>

 It's a little hard to tell, but it sounds like you have
some significant misapprehensions about what "static" and
"static synchronized" mean.

 I urge you to either get a book on programming with threads
in java[1] or check out one of the tutorials at:

 <URL:http://www.apl.jhu.edu/~hall/java/FAQs-and-Tutorials.html>

 or preferrably both.

 Writing multithreaded programs in Java is easier than in
some languages, but it's still quite hard, and the more
you know about the low level details of the language,
the better.

 If I'm misunderstanding what you're saying, and you have
a firm grounding in the details, then ignore the above :-)


-cks


[1] I like the second edition of Doug Lea's "Concurrent
Programming in Java"

___________________________________________________________________________
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

Reply via email to