wood burning stoves
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes URLyBird's [Version 1.2.3] and lockCookie Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "URLyBird Watch "URLyBird New topic

URLyBird's [Version 1.2.3] and lockCookie

Payal Shah
Ranch Hand

Joined: Jul 10, 2006
Posts: 67
-Should i use locking in local mode?
-What is the lockCookie value in local mode?
Thank you.
Alberto Ridolfi

Joined: Nov 30, 2008
Posts: 9

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.

Payal Shah
Ranch Hand

Joined: Jul 10, 2006
Posts: 67
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?

Roberto Perillo

Joined: Dec 28, 2007
Posts: 2270

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.

Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
Jeffry Kristianto Yanuar
Ranch Hand

Joined: Oct 01, 2007
Posts: 759
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)
I agree. Here's the link: http://aspose.com/file-tools
subject: URLyBird's [Version 1.2.3] and lockCookie
It's not a secret anymore!