From: Lane S. <la...@op...> - 2006-02-20 00:57:48
|
<html><body><font style=3D"font-family: arial,helvetica,sans-serif;" size= =3D"2">Hi Nikolaos.<br> <br> This is most disturbing to hear about.<br> <br> First, there is a known concurrency issue with WM in 2.0 and possibly in prior releases. If you look at the mail thread dating back for 45 days, you will definitely see it.<br> <br> My concern is that the webmacro instance, shared, and the context, not shared, is improperly orchestrated for concurrency. The webmacro instance is local to WMServlet. You might consider synchronizing access to this variable as a trial fix in your local calls below. This will introduce some serialization of web processing but it might help to verify the solution.<br> <br> One thing you might consider trying is to use a different cache handler. A few years ago, I wrote one and it is a part of the distro. I have never had a problem using this cache handler.<br> <br> Lane<br><br>--- Nikolaos Papadakis <nk...@cc...> wrote:<br><= br>From: Nikolaos Papadakis <nk...@cc...><br>Date: Sat, 18 F= eb 2006 10:50:33 +0200<br>To: web...@li...<br>Subjec= t: [WebMacro-user] [WebMacro-user<br><br>Hi all, <br> <br>I am using webmac= ro to develop a web-based application. <br>Things seemed to work fine till = yesterday. A customer complained that he <br>managed to =E2=80=9Csee=E2=80= =9D the account of another customer when he logged-in using <br>his own cr= edentials (he send me a screen shot of the =E2=80=9Cview=E2=80=9D). <br>By = inspecting the log file I found that both users have been logged-in <br>at= the same time (the second customer logged in 3 sec after the first <br>cu= stomer). <br>The system has more than 1000 customers but this inconvenience= happened <br>for the first time yesterday (?). <br>It seems that differen= t sessions have been mixed up. <br>The servlet includes a handle method and= uses several other methods <br>(methods that write and read from a databa= se). <br>All methods are defined in the same class (that extends WMServlet)= . <br>As far as I know servlets must not have instance variables (only loca= l <br>variables -inside methods- to prevent data corruption and <br>incon= sistencies). However in my servlet I use only one non local <br>variable (= a Logger) and I don't think this is the cause of the problem. <br>As an att= ached file I send you a fragment of the before mentioned servlet. <br>Can i= nstance variables be defined in the case of a servlet that extends <br>WMS= ervlet? (I mean is it safe? or its not a good practice without <br>keeping= precautions?) <br>Do you have any idea what can have caused this inconveni= ence ? <br>Is the use of methods inside the servlet thread-safe ? <br> <br>= Please help!!! <br>Nikolaos Papadakis <br></font></body></html> |