Re: applicability of static methods in web applications?



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.

.



Relevant Pages

  • Jelly?
    ... is a mix of web app (tech is old JSP tech right through to Facelets) ... fix code until the test works" cycle. ... Subversion) against our Jelly tests. ...
    (comp.software.testing)
  • Re: applicability of static methods in web applications?
    ... are 2 or more users using the app, data swapping occurs -- that is, ... Since I can't fix it, I just look at the code for now. ... Specifics, man, specifics. ... Static method is a likely culprit, ...
    (comp.lang.java.programmer)
  • Re: Help with copytree code
    ... This is very handy for installing a whole tree ... (like a web app) ... keeping everything intact. ... but a fix is more than I can come up with. ...
    (freebsd-hackers)
  • Re: Help with copytree code
    ... This is very handy for installing a whole tree ... (like a web app) ... keeping everything intact. ... but a fix is more than I can come up with. ...
    (freebsd-hackers)
  • strong name signing for web apps
    ... am I correct in assuming that setting it to full trust will fix my problem? ... how can I compile my web app with a strong name? ...
    (microsoft.public.vsnet.enterprise.tools)