"synchronized" method with Servlet-please help
2 posts in topic
Flat View  Flat View

Posted By:   Issic_Levy
Posted On:   Tuesday, May 25, 2004 01:13 PM


In my program, the users action changes a text file according some action they do after pressing the "submit" button. of course I don't want everybody to change the text file together , so I think using the Synchronized method would be the best. the problem is that I can't think how to use this method in servlets, I hope you can help me, thanks.

Re: "synchronized" method with Servlet-please help

Posted By:   Prashanth_Ghattadahally  
Posted On:   Wednesday, May 26, 2004 05:38 AM

Why don't you use acces control so that you can authentiacte the users instead of worrying about sycncronization and all.

Re: "synchronized" method with Servlet-please help

Posted By:   Sean_Owen  
Posted On:   Tuesday, May 25, 2004 01:39 PM

This is a somewhat complex question, but the answer is that synchronization alone is not enough here. You will probably need to design a more complex system. Probably you need to record when a user is editing a file, and not let any other user submit changes until the first user is done. Synchronization will be used in such a solution, but it is not all that you need.
About | Sitemap | Contact