Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

To: Paul Anil

 
John Lee
Ranch Hand
Posts: 2545
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul:
I just read your recent post about -- "modifying a record" and "booking a seat" are operations defined at different abstract level.
I think I have a better understanding of this project now.
Lock/unlock are not about business logic. Business logic wouldn't accept -1 for seat, just like "AAA" for airport, or "BBB" for day. Business logic can be implemented through modify() methods, i.e. use a if statement.
Then what lock/unlock are all about? Without them, users will race for write. Now with lock/unlock, users race for read.
Instruction gives a example:
lock -> read -> modify -> write -> unlock.
Without lock/unlock, then this pic will be :
lock -> modify (write) -> unlock.
Here lock is provided by synchronized methods.
There were many problem with each model. For the instruction model:
(1) It is unknow how long it will take for the process, user could lock the record, then something come up, then forget all together, and this record is left to be locked.
(2) An user try to book a flight when the record was locked already. Then what should you tell the user, "Another user is booking this flight, you can read it only, when can you book it? don't know, you have to try from time to time"?
For this project, I think these things are required as basic:
(1) criteriaFind(), lock(), unlock() methods ;
(2) server class ;
(3) client class (local and remote) with GUI ;
(4) more business logic: booking flight, more search methods.
(5) communication between server/client ;
The bottom line is that user want to get all kinds of flight information and possiblly book flight through this system.
Please comment.
Thanks,
Don
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3817
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sorry, I did not understand your question. Also some of your statments look contradictory. like:
Without lock/unlock, then this pic will be :
lock -> modify (write) -> unlock.


Is your confusion about the need for lock()/unlock() methods?

------------------
SCJP2 Resources, Free Question A Day, Mock Exam Results and More!
www.jdiscuss.com
Get Certified, Guaranteed!
www.enthuware.com/jqplus

Your guide to SCJD exam!
www.enthuware.com/jdevplus
 
Siddharth Mehrotra
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi there,
well i dont need to say anything my question is straight.
yes i need to know more about this lock/unlock method
and if possible do send me a link to the javaworld article on lock and unlock. if you have it with you

------------------
Sid
 
John Lee
Ranch Hand
Posts: 2545
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you write all those books, just curious.
Don
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic