posted 16 years ago
Hi All, thanks for hanging in there with me on this. It looks like a problem with some code that gets a list of data from the database. It is nothing fancy, but I guess the problem came up because the user was doing a training with a bunch of other users doing all the same actions at the same time pinging the same server from several clients.
I thought it was the multiple window.opens, but I think it was just a coincindence that it happened over time.
I thought synchronization was only needed for when you were setting data, I didn't think getting it would be a problem. Here is the code.
I have added a log message right before the below method is called, and then one message after it. In my log file I usually see the before and after messages over and over, but right before things lock up, I see two messages saying "going to get users" whith no "back from get users" in between. Then things are locked up. So, I guess this is a race condition? Would simply making the method synchronized make the second method call wait for the first to finish?