• 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

locking and cookies

 
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I wonder if someone can explain to me what I have to store in the Map object in the update method. The Map obviously maps a key to a value.

Either the value or the key will be the recNo parameter but what about the other variable? I have seen the word cookie being bandied around? What's this for and how is it generated?

Any help regarding this will be appreciated.
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,Keith Jones

I don't have the Cookie in my UrlyBird version.you too
But, other versions have the cookie.



We don`t need to make a cookie beacuse of aother version.

If you want to make cookie,Look at the following code.



Cheer up Jones


[ November 21, 2006: Message edited by: Smith Jone ]
 
Keith Jones
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,

Thanks for the reply. Yes I guess I should smile more.

Ok so let me get this straight since we both don't have a signature which requires a cookie that means

1. we don't need to store a cookie
2. we don't need to have a datastructure that stores key value pairs (we can use an arraylist instead for example)
3. we can put a cookie in if we want to in the way you described

Cheers, and still smiling
 
Smith Jone
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

1. we don't need to store a cookie
2. we don't need to have a datastructure that stores key value pairs (we can use an arraylist instead for example)
3. we can put a cookie in if we want to in the way you described



OK,I understood that you said.
Of course,You should use arraylist or vector in Locking method.
But, You&I may have a datastructure that stores key value paris.
Because Anything will do. (in this case - Locking mechanism)


By the way,You applied Object Adapter Pattern in Database,too ??


https://coderanch.com/t/188772/java-developer-SCJD/certification/Adapter-Pattern
[ November 21, 2006: Message edited by: Smith Jone ]
 
Keith Jones
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

No I'm not using the Adapter pattern or anything fancy like that. I read your post and unfortunately I don't understand what's going on there. It seems a bit complicated. All I'm doing is catching IOExceptions etc inside my methods. That's one way of getting around it.

As for cookies - are you personally storing them? If so what use are they to us?
 
Smith Jone
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I use Cookie,just in case.As following code...
How do you implement Locking?




But,Cookie is a good-for-nothing so far.
[ November 21, 2006: Message edited by: Smith Jone ]
 
Keith Jones
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
wow that looks very complicated. I've not got to this stage yet I'm still working on the update method
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic