Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Locking more than one records..

 
Pallav Grigo
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi..I've read some posts on how the Connection object for each client implements the Unreferenced interface...so that it unlocks "all" the locksthat it currently holds...Here's my problem...in my design..the client can only book one flight at a time..although he/she can enter the number of seats..so they get only one lock at a time..so can i just keep the current lock in an int variable and then unlock that in case the client crashes?
Regards,
Pallav
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pallav, if you can guarantee that it will ever forever only have one lock at any time, then you should be fine.
Mark
 
Nigel Browne
Ranch Hand
Posts: 703
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the key issue here is that "Your user interface should be designed with the expectation of future functionality enhancements".
This may mean that a future enhancement could be select a route and book all available seats. This would mean that more than one row would be locked until the seat booking request had been executed.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic