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

how to do ticketmaster site seat reserved ?

 
david chan
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a similar problem as ticketmaster site need to solve. In the ticketMaster web site, when you try to reserved some seats, that seats will locked only for you during your transaction. So that there will be no two persons reserved same seats.
I am working on a JSP/Servlet/Oracle 8.1.7 and Struts 1.1 based web system (note, no EJB). My problem is I need to lock a particular record in Oracle for a period of time, so that only one user on the client side (browser site) can see this particular record.
As soon as one user get the record, all other users will be blocked (not able to read/write onto this record), so at anytime, only one user will working on on record.
Any advise how to do that in a easier way?
Thanks.
David
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about having a "locked" boolean column for each record? You can simply set the column to true in a pre-reserve transaction and have all selects filter out the locked column by adding an additional constraint "Where locked='false' "
You can then simply clear the flag when the client abandons the transaction.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic