There is a little bit more to being thread-safe. The biggest danger
comes when a static method refers to a static/class field because it
may be used by multiple threads at the same time. This has happened a
few times in the history of OFBiz, and hopefully there isn't anything
like this in the code right now (and there are none that I am aware
of), but there could be.
-David
On Sep 9, 2009, at 8:52 AM, Adrian Crum wrote:
I don't know what you mean by all the Java methods are static. There
are some static methods in utility classes, but that is standard
practice in Java programming.
The static methods are thread safe because there is no instance of
the enclosing class. In other words, the utility class does not have
a state that can be altered by threads.
-Adrian
Hemanth Kumar Kanamarlapudi wrote:
Hi Users,
Can any one tell me the architectural reason why all the java
methods are static and how these will be thread safe
Also any implications or the things we need to handle when we are
using some third party java objects with out static methods from
ofbiz static methods.
If any document about this is available please let me know the
particular section or page number along with document url.
Thanks in advance.
Thanks & Regards
Hemanth
________________________________
http://www.mindtree.com/email/disclaimer.html