Nguyen,
You do not need to synchronize any of the methods in the servlets.
If you are only reading the database, there is no need to synchronize any
of the methods because the data is not changing.
If you are reading and then updating the database, you would want to begin
a transaction before you read and update.

Regards,

Richard


At 11:24 AM 10/2/01 +0700, you wrote:
>     Hi all,
>     I have 2 servlets (2 classes) trying to read a field in database and I
>want to synchronize this action. These 2 class also had a base class but as
>I know, each servlet will have a instance of base class for its own so I can
>not use synchronized methods in base class.
>     Is there any solutions for this problem ???
>     Any help is really appreciated.
>     H.
>---------------------------------------------------------------
>Nguyen Van Hoang
>R&D Engineer
>Arawana Project
>MIS Team
>SSL Viet Nam Ltd.
>
>___________________________________________________________________________
>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

Reply via email to