J. Adams

Greenhorn
+ Follow
since May 04, 2000
Merit badge: grant badges
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by J. Adams

I'm also doing Fly By Night.
Are you allowing the user to cancel a "reserve seats" operation? It could take a long time if someone else has a lock on the flight.
Are you making time outs on the locks? Without them, a client could grab a lock, quit, and make it impossible for anyone else to reserve seats on that flight.
The way I implemented locking was to keep an ArrayList with an entry for each flight. When someone grabs a lock, the corresponding entry in the ArrayList is set. Would-be lockers wait() for locks and are notify()ed when locks become available.
I've been thinking about making the flat file reader launchable from the GUI client.