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

NX:UrlyBird 1.1.3 - Sharing Data class in local mode

 
S Bala
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How are you all implementing data access for the local mode. I believe one need not use locks for the local mode, but I am not sure how to separate them.
Since, my interface takes lockCookie as a parameter.
eg. -

public void update(int recNo, String[] data, long lockCookie)

Or can we use locks in local mode too, as my instructions for locking does not specify it .
- Shankar
 
Bharat Ruparel
Ranch Hand
Posts: 493
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Shankar,
There are a number of threads on the forum (do a search on local on the forum) where people have answered this question. Basically, they are advocating keeping the same code for both local and network mode even if the lock and unlock code may be redundant in the local mode. Max's book also uses the same approach. Not sure about cookies though, see my reply to your reply in the earlier post.
Regards.
Bharat
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My interface requires that a record be locked before anyone can use update() or delete(). They need the correct cookie too. It doesn't matter if the program is in local mode or not. Even though "common sense" says that in local mode there's only one client, so locking shouldn't really be necessary, nonetheless the instructions require locking, period. It sounds like your instructions are probably the same.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic