File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Booking - Functionality Clarification Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Booking - Functionality Clarification" Watch "Booking - Functionality Clarification" New topic
Author

Booking - Functionality Clarification

Glen Iris
Ranch Hand

Joined: Jul 13, 2011
Posts: 164

Hi Folks,

Two clients are running. Both clients (correctly) see no booked records in the database. Client 1 books a record X by placing a customer id of 12345678 against the record as the records owner. Client 2's GUI is still showing no owner for record X.

1 - Can client 2 place a customer ID of 87654321 against record X ?

My guess is no. What I think should happen is that you can only place a customer ID against a record if there is no ID against the record already, regardless of whether or not your GUI shows it.

So if this is the case - my next question is:

2 - Can client 2 return record X even if it was client 1 which booked the record?

If the answer to question 2 is, only client 1 (ie the client who booked the record) may return the record, what happens if client 1 terminates. Does that mean that record is forever booked?

G



OCPJP 6, OCMJD
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5122
    
  12

Of course double bookings are not allowed. You don't want to arrive at a hotel and discover 2 couples booked the same room, no romantic weekend for you and your partner. So when client 2 wants to book an already booked record (although it seems to be available according to the GUI) an error "Room/contractor already booked. Please book another one." should be shown.

You should also make sure that the time a record is locked is as short as possible. So instead of already locking a record when the "book dialog" is shown (where you can enter the customer id), you should start the booking process (lock/update/unlock) after the user confirmed the "book dialog".

If client 1 terminates and has booked record 1, record 1 will remain booked forever (because there is no unbooking functionality). But it's quite normal a booking is booked forever (I booked a holiday at the end of October, so I hope it's still booked at the end of this month when I'm actually on holiday )


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
Glen Iris
Ranch Hand

Joined: Jul 13, 2011
Posts: 164

Thanks Roel. It's just another case of the assignment requiring unrealistic functionality I guess.

Please don't go on holiday before I finish my assignment!!!who the heck is going to save me then?

Seriously buddy, thanks again and have a nice time
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5122
    
  12

Glen Iris wrote:Please don't go on holiday before I finish my assignment!!!who the heck is going to save me then?

My good buddy Roberto And don't panic: in the hotel is free wifi
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2258
    
    3

Well, sometimes I'm just on the background, but I'm always here


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Booking - Functionality Clarification
 
Similar Threads
NX:Some question about booking
NX: About Locking
GUI display & booking questions
NX: Using SwingUtilties.InvokeAndWait method in GUI
Questions about automatic failure