Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

URLyBird's [Version 1.2.3] and lockCookie

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
-Should i use locking in local mode?
-What is the lockCookie value in local mode?
Thank you.
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

As far as I understand it, he locking requirement is defined in the DB interface, and whether you are using the app in local or remote mode, your database requests are going to be made over this DB interface implementation that you are creating. Since the interface mandates that you use locking, you should use it, no distinction if you are in local mode or remote mode. Therefore, the cookie value in the local mode should be the same as in remote mode.

Cheers
 
Payal Shah
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok..So I read few posts saying use 0 or -1 for cookie value if you are in local mode, is not correct then rihgt?

thanks
Payal
 
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Should i use locking in local mode?


Definitely. If you don't use it, you'll fail.

What is the lockCookie value in local mode?


This value has to be generated in your Data class (it is a long value in your case, isn't it?). You have to use it no matter if in local or networked mode.
 
Ranch Hand
Posts: 759
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Payal Shah:
-Should i use locking in local mode?



I used it, I don't know it is a good choice or not, because in my assignment, the lock and unlock method is called before and after book the room no matter what the class used to access the database (because it accessed through interface)


Jeffry Kristianto Yanuar (Java Instructor) SCJP 5.0, SCJA, SCJD (UrlyBird 1.3.2)
 
Would you like to try a free sample? Today we are featuring tiny ads:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic