• 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

question about lockCookie

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 531
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 531
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic