The bean thread safe basically means that each client talks to a different bean instance. Hence if your bean has an attribute of some simple data type like an integer and one client increments that integer, the changes are visible only to that client. Compare this very simple example with a servlet and you�ll notice the contrary: one needs to synchronize the data access in the servlet itself, since multiple clients might share the same servlet instance (this is why defining attribute instances in servlets is a bad practice, but not with ejbs). However if the instance attribute is a singleton or your beean accesses a static class, then the story will get little bit more complicated. In this case all bean instances will share the same unique object and the singleton/static class needs to be design thread safe. Regards.
Thanks, I really appreciate it. I see what may be the problem still have more questions
If a static utility class static method (which does not have any instance/class variable ) when 2 thread enter the method have their own local copies of method arguments , so will each thread will have its own context or is it still possible that the thread that comes in later may overwrite the local method arguments for he earlier thread , While I am going to test this ... I thought I should ask in case I conclude wrongly that without instance variables everything is actually thread safe.
Is there like a thread forum here ?! [ May 24, 2005: Message edited by: Lakshmi Anantharaman ]