Re: applicability of static methods in web applications?
- From: pacleb@xxxxxxxxx
- Date: 19 Apr 2007 17:21:45 -0700
On Apr 6, 4:34 am, "vishist" <vishi...@xxxxxxxxx> wrote:
Hi,
For my project, I see that some people use static methods for the
web-application in DB layer.
eg:
public static List getId(){
return list;
}
Now, I know that this method works in a threaded environment since all
these methods fall in thread scope. But coding like this defeats the
whole purpose of choosing a object oriented language. I'm confused
here whether it is a good style or not.
You comments are really appreciated..
V.
Hi All, I'm experiencing a major issue with my web app. When there
are 2 or more users using the app, data swapping occurs -- that is,
when User A and User B is using the system at the same time,
sometimes, User A can see data of User B.
As of now, I haven't found out the exact scenario in which I can
reproduce this issue. Without knowing how to test it, I can't fix it.
Since I can't fix it, I just look at the code for now. I'm having
thoughts that the swapping occurs because the code uses a static
method in retrieving data from the database.
I'm not sure of this. But any insight of what I said above would be
really helpful.
.
- Follow-Ups:
- References:
- applicability of static methods in web applications?
- From: vishist
- applicability of static methods in web applications?
- Prev by Date: Re: Starting and Stopping an External Process
- Next by Date: Re: Identical Item in Cut/Copy/Paste
- Previous by thread: Re: applicability of static methods in web applications?
- Next by thread: Re: applicability of static methods in web applications?
- Index(es):
Relevant Pages
|