• 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

A question for implementing repeatable reads

 
Ranch Hand
Posts: 463
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,
I have a question on a transaction handling by EJBs' .
I have a hotel reservation to be done.
Customer selects the hotel he wants to stay in. The issue I am facing is that while the customer is doing reservation for one hotel room I have to block any updates to the hotel for that chain of hotels else the rooms available will go out of synch. What transaction handling do I implement here
Any one please give me some suggestions.
Thanks
 
Dhiren Joshi
Ranch Hand
Posts: 463
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,
The confusion was coming becuase I was implementing a repeatable read block even for querying the rooms available. I figured the transaction context needs to be applied only when an update is done.
If another customer comes in while another is browsing the availability of rooms ,then its unfair to block the other customer from booking.
This is how I coded it and it seems that concurrent users can have access to reserve but in this case the first one gets it done. Any way I will let the client worry about it if my implementation is right or wrong. And they can request for the changes, For now this is how I implemented it .
Any ideas.
 
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Dhiren,
As for this thread it looks like the Oracle forum is a more appropriate place for the topic.
Regards,
Phil.
 
You can thank my dental hygienist for my untimely aliveness. So tiny:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic