aspose file tools*
The moose likes JDBC and the fly likes Row locking using oracle database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Row locking using oracle database" Watch "Row locking using oracle database" New topic
Author

Row locking using oracle database

kwwong wong
Ranch Hand

Joined: Feb 15, 2002
Posts: 56
I have a problem on record locking using JDBC. My application have a JTable to show the records of the table in Oracle DB. User can select the row in the table and the form is shown to display the detail of the record. Before the form is display, I am using the statement SELECT * FROM TABLE_NAME WHERE ID = ? FOR UPDATE NOWAIT to lock the record. The problem is when one user lock the record, another user also cannot lock other record. It seen that the whole table is locked by the first user. Why ? In my knownledg, the select for update statement only lock the selected record. Other rows can be update by other people.
Have any suggestion? Thanks
 
Consider Paul's rocket mass heater.
 
subject: Row locking using oracle database
 
Similar Threads
Confused about Locking
when Locking event is trigger
Optimistic Or Pessimistic locking .
Record-Level Locking In JDBC
Locking with JDBC