Can u pls mention what is that Oracle feature ?. Reading the data again is time consuming. ----- Original Message ----- From: "Johan Kok" <[EMAIL PROTECTED]> To: "'Tomcat Users List'" <[EMAIL PROTECTED]> Sent: Monday, November 03, 2003 12:17 PM Subject: RE: Design advice needed.
> Anthony, > > Did you consider reading the record without locks, and when an updated are > made, to take a write-lock, check that the original record are still the > same and then apply, otherwise fail. > > Your intentions might not work unless all writes are passed through the > container, as Oracle will not have any control, until a write occurs, i.e. > you will have to open with read only, and only take out a lock when you are > going to write, as described above. for safety sake your container will have > to re-read the data in any case, before commiting, otherwise it may update > changed data, e.g. updates that are made through other processes or even > triggers. > > If my memory serves me right, that is something you can do easily with > Oracle (i.e. there's a standard feature implemented), even with Oracle 6/7. > > > > > > -----Original Message----- > > From: Antony Paul [mailto:[EMAIL PROTECTED] > > Sent: 03 November 2003 08:36 > > To: Tomcat Users List > > Subject: Design advice needed. > > > > > > Hi all, > > I need a replacement for row level locking in database. > > The requirement > > is if two users are updating the same row of a table only the user who > > updates first will be made to database second user must get a failed > > message. This can be done using row level locking. But it > > allows only one > > user to open page for editing at same time. If another user > > has locked the > > row then second user cannot lock the same row or update it. > > So I want to > > implement locking in Container. Is there any design patterns > > available for > > this. Or have anyone implemented this. I am using Tomcat > > 4.1,Servlets JSP > > and Oracle 8i. The application is using MVC pattern but do > > not use Struts. > > > > Antony Paul > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]