• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Locking more than one records..

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic