File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes locking and cookies Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "locking and cookies" Watch "locking and cookies" New topic
Author

locking and cookies

Keith Jones
Ranch Hand

Joined: Oct 30, 2006
Posts: 105
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.


SCJP 1.4
Smith Jone
Greenhorn

Joined: Nov 15, 2006
Posts: 11
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 ]

SCJP 5.0<br />SCJD(In progressing!)<br />SCWCD(planing)<br />SCBCD(planing)
Keith Jones
Ranch Hand

Joined: Oct 30, 2006
Posts: 105
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

Joined: Nov 15, 2006
Posts: 11
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 ??


http://www.coderanch.com/t/188772/java-developer-SCJD/certification/Adapter-Pattern
[ November 21, 2006: Message edited by: Smith Jone ]
Keith Jones
Ranch Hand

Joined: Oct 30, 2006
Posts: 105
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

Joined: Nov 15, 2006
Posts: 11
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

Joined: Oct 30, 2006
Posts: 105
wow that looks very complicated. I've not got to this stage yet I'm still working on the update method
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: locking and cookies