You'll probably want to synchronize on a static object I think. Something like this:
public class WhatEver { protected static Object lock = new Object(); public void doStuff() { sychronized( lock ) { // do protected stuff here } } } --mikej -=----- mike jackson [EMAIL PROTECTED] > -----Original Message----- > From: Emilio Miranda [mailto:[EMAIL PROTECTED]] > Sent: Monday, May 20, 2002 11:15 AM > To: Tomcat Users List > Subject: just one edit. > > > > Hello, I am sorry if that is an offtopic. > > How can I be sure that only one user is changing some data at the time? > could Tomcat help me on that? > I mean , supouse that one user change a name an another try to > change at the > same time. > > Thanks a lot! > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>