Chenming Zhao wrote:

>Hi,
>When two users call the bean almost at the same time, it seems that they share the 
>same object and their implementing is dependent with each other (I hope they are 
>independent), and cannot get correct results. Should I configure Tomcat? I think the 
>java bean is no problem. It's urgent. Please help me.
>
>Minger
>
If it's a shared bean, sycnchronize it.   Make sure that 
all mutators(Setters) are synchronized, and it would be a bad idea to do 
that to the
accessors (mututors) are synchronized too.  If you have more open than 
private member variables in this bean, make sure they are private.
e.g.

public void synchronized setName(String name) {
            .....
}

-- 
Daniel Hinojosa
Java & XML: Consultant | Developer | Instructor
P.O. Box 4675
Albuquerque, NM 87196-4675
(505) 363-5832






--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to