• Post Reply Bookmark Topic Watch Topic
  • New Topic

About locking issue, how to store cookies  RSS feed

Chih-Wei Lee
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am on the point of implementing lock and unlock method. My question is how most people store cookies with record.
I have two ways to do it.
1. I have a object class called Contractor. This object store the information about one record. So I can add a property called cookie to adhere this object. So when someone locks this record, he updates this property and unlock this record by updating this property to 0.

2. Using a Map collection to store cookie, like <Key: recNo, Value: cookie>
If record is unlocked, it sets value as null or 0.

Can someone give me suggestion that which one is better?
I worry about the synchronize problem.


Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!