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

Could somebody suggest me about locking in standalone mode,please?

 
Ken Kirin
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I saw a lot of discussions about whether or not to have locking mechanism in standalone mode but I am not really understand exactly how you guys do it. It is acceptable not to have any locking mechanism in standalone mode because we can assume that only one client accessing the database. I have the Data class that extends DBAccess interface as the instruction said. I am enjoyable working on locking mechanism for the network mode. But I still have no clue how to use the same Data class in standalone mode without using the lock/unlock method provided from the DBAccess interface since any other method requires a lockCookie as a parameter which can be obtained from the lock method. Did anyone reimplement the DBAccess interface and provide different Data access classes ( one for standalone mode and another for network mode? ). In my instruction(B&S 2.2.1) It stated "Architecturally, this mode must use the database and GUI from the networked form, but must not use the network server code at all.". I interpreted that we have to use the same Data class in both modes. Am I correct about this? I ever read someone mentioned about LockManager, how this relates to the locking implementaion in the standalone mode? Any help and suggestion about this would be highly appreciated. Thank you

Ken Kirin
SCJP
SWCD
SCJD(in progress)
 
Daniel Simpson
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ken Kirin:
Hi All,

I saw a lot of discussions about whether or not to have locking mechanism in standalone mode but I am not really understand exactly how you guys do it. It is acceptable not to have any locking mechanism in standalone mode because we can assume that only one client accessing the database. I have the Data class that extends DBAccess interface as the instruction said. I am enjoyable working on locking mechanism for the network mode. But I still have no clue how to use the same Data class in standalone mode without using the lock/unlock method provided from the DBAccess interface since any other method requires a lockCookie as a parameter which can be obtained from the lock method. Did anyone reimplement the DBAccess interface and provide different Data access classes ( one for standalone mode and another for network mode? ). In my instruction(B&S 2.2.1) It stated "Architecturally, this mode must use the database and GUI from the networked form, but must not use the network server code at all.". I interpreted that we have to use the same Data class in both modes. Am I correct about this? I ever read someone mentioned about LockManager, how this relates to the locking implementaion in the standalone mode? Any help and suggestion about this would be highly appreciated. Thank you

Ken Kirin
SCJP
SWCD
SCJD(in progress)

Originally, I was going to not do locking in local mode, but that would require to overload every method that takes a cookie in the parameter list. I took the easy way out and did locking in local and documented my choice. Hope that helps.
 
Clivant Yeo
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ken,

You do not have to care about locking issues in standalone mode, just use the same Data class that have locking for the standalone mode.

Regards,
Clivant
 
Ken Kirin
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am thinking of having locking mechanism in standalone mode as well. This would be easy and doesn't effect the performance hit much. If anybody would have any other good reason to do ( or not do ) so, please let me know. Thank you Daniel and Clivant

Ken Kirin
SCJP
SWCD
SCJD(B&S In progress)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic