Got it. Thanx for the explaination. =)

On Sun, Jan 29, 2012 at 3:44 PM, David E Jones <[email protected]> wrote:

>
> Thread safety issues come from the use of static fields in a class, not
> static methods.
>
> -David
>
>
> Foo Shyn Chung wrote:
> > Hi all,
> >
> > This may sounds stupid, please spare me =p.
> >
> > I've noticed that methods in the Services class are written as static and
> > i'd come across a discussion thread that talked about why it is so.
> > (http://osdir.com/ml/user.ofbiz.apache.org/2009-09/msg00284.html)
> >
> > However, there are times that a method in the Service class is either too
> > long or there are common codes between 2 methods that i would like to
> > refactor them into using a new method. Since all the methods need to be
> > static, so the new smaller methods that i'm creating will be in static as
> > well. I wonder whether this would cause the thread-safe issue concerning
> > the static state of the methods?
> >
> > Thanx
> > FooShyn
> >
>

Reply via email to