dcsimg
recordlocking - jsp-jdbc-sql programming
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Patrick_Goovaerts
Posted On:   Thursday, October 4, 2001 09:37 AM

I have a webapp which allows a user to retrieve a record from our AS400 using SQL 'and prepared statements'. I also can write / update records in the database. How do I handle 'record-locking'? As an RPG-programmer, I was lucky that this is done by the AS400 itself. Sure, I can add a statusfield 'locked Y/N' - which can be changed to 'Y' when record is read - which can be changed to 'N' when record is updated/deleted But... when user reads a record (locked = 'y') 1) he can close the browser without doing the update... 2) he can keep the session open without doing anything... 3) the connection can be lost...    More>>


I have a webapp which allows a user to retrieve a record from our AS400 using SQL 'and prepared statements'. I also can write / update records in the database.


How do I handle 'record-locking'? As an RPG-programmer, I was lucky that this is done by the AS400 itself.


Sure, I can add a statusfield 'locked Y/N'

- which can be changed to 'Y' when record is read

- which can be changed to 'N' when record is updated/deleted

But... when user reads a record (locked = 'y')

1) he can close the browser without doing the update...

2) he can keep the session open without doing anything...

3) the connection can be lost...

4) servlet-programming error can occur...

please advice...

   <<Less
About | Sitemap | Contact