Maybe it's best to rely on transactional mechanisms of the database.
Then you don't have to worry about locking in your application. When one
administrator A saves the data, the application could easily check if
data has been updated by any other administrator B (or perhaps a user)
since A began his editing, and notify administrator A about this. 

Regards, Kent Vilhelmsen


> On Mon, 20 May 2002, Emilio Miranda wrote:
> 
> > Hi, really apreciate your help. but What I mean is a case in web.
> > It is:
> >
> > administrator A login to a site and modify data of some user
> >
> > at the same time administrator B are modifying the data of the same user.
> >
> > I would like some message for administrator A, something like a "sorry you
> > cant change these data right now" .
> >
> > So I want to know if Tomcat could help me in some way
> >
> > Thanks a lot!
> >









> > -----Mensaje original-----
> > De: Mike Jackson [mailto:[EMAIL PROTECTED]]
> > Enviado el: lunes, 20 de mayo de 2002 13:32
> > Para: Tomcat Users List
> > Asunto: RE: just one edit.
> >
> >
> > 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]>
> >
> >
> > --
> > 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]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to