I think if you have stuff in your method that could cause racing conditions
you should synchronze the methods, because there could be several users
access the same webapp that use the classes in session, which the webserver
ususally use mutiple threads to support.

Gang

----- Original Message -----
From: "Fei Li" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 24, 2002 10:15 AM
Subject: sharing


> Hi,
>
> I have a class instance staying in session. Should I synchronize the
methods
> in the class?
> Please reason your help.
>
> Thanks
>
> Fei Li
>
>
___________________________________________________________________________
> 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