• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

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.
 
Time is the best teacher, but unfortunately, it kills all of its students - Robin Williams. tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic