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

question about lockCookie

 
Yanxin Zhao
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi:
I do not know how to deal with the lockCookie ?
I think it is useless in my code, but I have to use it.
So, I want to ask how to generate the lockCookie value, and how to use it.?
And I still have another problem. how to add some blank space at the end of a String ?
Thanks
[ July 28, 2004: Message edited by: Yanxin Zhao ]
 
Anton Golovin
Ranch Hand
Posts: 527
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Yanxin Zhao:
Hi:
I do not know how to deal with the lockCookie ?
I think it is useless in my code, but I have to use it.
So, I want to ask how to generate the lockCookie value, and how to use it.?
And I still have another problem. how to add some blank space at the end of a String ?
Thanks

[ July 28, 2004: Message edited by: Yanxin Zhao ]


I am going to have the DataImpl class generate a long and return it to the client. I still have to figure out how to do that.
 
Robert Konigsberg
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which assignment are you using? Boggit&Scrapper? Why do you think it's useless?
 
Yanxin Zhao
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi: Robert
Thank for your answer. In fact, I just want to ask how or where should I generate the lockCookie ?
And another problem, How to add some blanks space at end of a String, you know there are some blank spaces in any colomn in the db file, so if I want to add a new record I have to add some blank spaces at the of each colomn.
Thanks for your answer, again.
 
Yanxin Zhao
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi:Anton
First of all, thanks for your answer.you said you will have the Dbimpl class to generate a long value. so I want to ask you how did you generate the long value. I really do not know how to do it, please tell me.
 
Anton Golovin
Ranch Hand
Posts: 527
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would just have it generate sequential values from 0. Client could call a method from the object, public long identifier(), and get a lockCookie back. It would later use it to communicate with the server. I would put this method into the interface Identifiable, for instance, that I would have the DBRemote interface extend. My DataImpl (remote-enabled) class would have the following:


[ July 29, 2004: Message edited by: Anton Golovin ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic