• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NX:UrlyBird 1.1.3 - Sharing Data class in local mode

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 493
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Villains always have antidotes. They're funny that way. Here's an antidote disguised as a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic