File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Transaction Locking Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Transaction Locking Question" Watch "Transaction Locking Question" New topic
Author

Transaction Locking Question

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Let's say that I start a new Transaction. I pull the Autoincremented ID that I need for the transaction from the future new record. And then I lock that record so another transaction can't write to it. So in the mean time, another user has created a new transaction therefor creating a new record. His ID is 100. The ID I have locked is 99 and then I decide to cancel my transaction. So now I have records
95
96
97
98
100
Will the next transaction use record 99 or 101?


GenRocket - Experts at Building Test Data
 
 
subject: Transaction Locking Question
 
Similar Threads
Transaction Management in JDBC
Simple Lock question
A Transaction Question
passing references to methods
Exception handling