permaculture playing cards*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes NX: More interface confusion. 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 "NX: More interface confusion." Watch "NX: More interface confusion." New topic
Author

NX: More interface confusion.

Jacques Bosch
Ranch Hand

Joined: Dec 18, 2003
Posts: 319
In my DBAccess interface I have the following:
//Throws SecurityException if the record is locked with a cookie other than lockCookie.


Since I'll be locking on the passed lockCookie, how will there ever be a case in the implementation of this method where I will try lock with a Cookie other than lockCookie?
Sorry if I'm being slow, but it doesn't seem to make sense to me.
Jacques


Jacques<br />*******<br />MCP, SCJP, SCJD, SCWCD
Terry Martinson
Ranch Hand

Joined: Oct 18, 2003
Posts: 293
The record would get locked before you call the update. So,
1. get a lock on the record (this returns the lock cookie to you and adds an entry to your locking mechanism)
2. call update using that lock cookie
3. update verifies that the lock cookie it receives is the same as the one stored in your lock mechanism
Have you had a chance to look at the "Max" book? Good example in there. This is the book by Mehran Habibi that is referred to all over this forum. Check the bunkhouse for a review of the book.
Hope this helps.
TJ


SCJP, SCJD, SCWCD, SCBCD
Jacques Bosch
Ranch Hand

Joined: Dec 18, 2003
Posts: 319
Hi TJ.
Ah. That makes a lot more sense. Thanx much! As I suspected, I was being slow. Neglected to consider the lock methods.
I am in South Africa and don't have access to Max's book. Sadly. Sounds awesome.
Let me continue being slow be asking the following.
[code]
public long createRecord(String[] data)
throws DuplicateKeyException;
[code]
In the above method, when would a DuplicateKeyException be needed.
Thanx much.
Jacques
Terry Martinson
Ranch Hand

Joined: Oct 18, 2003
Posts: 293
Sorry - don't have much time now since I am at my regular full-time job working. My suggestion - do a search on this forum with "DuplicateKeyException".
Lots of these types of questions have been discussed already on this forum and the search mechanism is wonderful in that you can pull up tons of information without having to wait for someone to answer a new post.
Good luck!
TJ
Jacques Bosch
Ranch Hand

Joined: Dec 18, 2003
Posts: 319
Will do.
Thanx.
Philippe Maquet
Bartender

Joined: Jun 02, 2003
Posts: 1872
Hi Jacques,
I am in South Africa and don't have access to Max's book.

I order most of my technical books on Amazon.com from Belgium. The delivery is performed by DHL and it works well. Not sure it would be the same in Center Africa, but in South Africa ?!
"DuplicateKeyException" ... mmh, Terry is right. Do a search first, but don't hesitate to come back if you've additional questions on the topic. *No topic* is definitively closed on this forum !
Best,
Phil.
Jacques Bosch
Ranch Hand

Joined: Dec 18, 2003
Posts: 319
Phil, yes. I'm sure amazon would work. But can't afford the book and shipping at the moment. About R7 per $1.
Works out to quite a bit... if you don't have it.
Jacques
Jacques Bosch
Ranch Hand

Joined: Dec 18, 2003
Posts: 319
My brain's fride.
I forgot to tell you, another MAJOR reason it won't help getting the hard copy "Max" book is because I am almost blind. Therefore it won't be of much use to me. I need it in electronic format.

Jacques
Max Habibi
town drunk
( and author)
Sheriff

Joined: Jun 27, 2002
Posts: 4118
Hi Jacques,
The next version on my book should be available on an electronic format. Unfortunately, that wasn't possible with this one.
All best,
M


Java Regular Expressions
Philippe Maquet
Bartender

Joined: Jun 02, 2003
Posts: 1872
Hi Jacques,
I forgot to tell you, another MAJOR reason it won't help getting the hard copy "Max" book is because I am almost blind.

Sorry about that. Now I must tell you that the *best* developer I ever knew in all teams I've been working in was almost blind too. When he started working with me, I remember that he came to work on a motorcycle. His illness is a genetic one (retinis pigmentosa (RP)), which makes you become blind slowly but surely . You cannot even imagine the level of admiration I had for him. But as it may happen with best friends sometimes, I didn't keep in touch with him for 2.5 years (same for him BTW ). Thanks to *you*, I just phoned him today and we'll meet very soon. Thank you for that !
I cannot help you with an electronic version of Max's book which doesn't exist yet, but I am willing to send you my own original copy. I just need your address, that you can tell me in a private message here. Max's book is *really* helpful. As you can post on this forum, I guess that it may help you too, even just a bit, and sorry if I am wrong.
Knowing how this forum works, I know that you'll have *hundreds* of people around here willing to help you. Though after having read your first posts, it looks like you don't need *any* help...
Best regards,
Phil.
[ January 06, 2004: Message edited by: Philippe Maquet ]
Jacques Bosch
Ranch Hand

Joined: Dec 18, 2003
Posts: 319
Max, Thank you. Do you know when it will be available? And what format?
And Phil. Thanx for your thoughts. Glad I could help with getting you back in touch with your friend!
I have a condition called Macular Degeneration.
Though after having read your first posts, it looks like you don't need *any* help...

I can assure you I'm going to need allot of help. I'm really grateful for this forum.
...but I am willing to send you my own original copy.

Phil, that is really amazingly generous of you! It might help some, but I'll have to scan it in and OCR it. That will probably mess up the code examples though. But I'll write you privately and we can discus. I don't want you to give your book away if it won't work for me
Thanx very much!
Jacques
Philippe Maquet
Bartender

Joined: Jun 02, 2003
Posts: 1872
Hi Jacques,
but I'll have to scan it in and OCR it. That will probably mess up the code examples though.

No issue with the code examples : source code is available online when you have the book.
I don't want you to give your book away if it won't work for me

I know it by heart... (I was kidding). I read it, it's *really* worth while, but ... I read it . It's OK for me.
But I'll write you privately and we can discus.

Fine !
All Best,
Phil.
Max Habibi
town drunk
( and author)
Sheriff

Joined: Jun 27, 2002
Posts: 4118
Originally posted by Jacques Bosch:
Max, Thank you. Do you know when it will be available? And what format?

It's going to be some months(maybe 6-12), and it'll be pdf. I believe that works?
M
[ January 06, 2004: Message edited by: Max Habibi ]
Philippe Maquet
Bartender

Joined: Jun 02, 2003
Posts: 1872
Hi Max,
and it'll be pdf. I believe that works?

Jacques wrote he is *almost* blind. I don't know what *almost* really means in his case, and BTW, I just noticed that telling you about my friend/collegue that "I remember that he came to work on a motorcycle." doesn't make any sense without the next part of the story . The "motorcycle" part of the story was in '89, while we worked together till '97. And in the meantime, he became *almost* blind, meaning that he hardly could move alone in the street from home to work at the end. How did he make to work as a developer, between '89 and '97, with an eyesight still going down, but with a *unaltered* productivity/creativity at work is ... still a mistery for me.
Now I remember that he used very special mouse cursors (very BIG and auto-moving/blinking on demand - BTW my friend is the author of such a special mouse driver and I just retrieved it on Google ( http://www.ordivision.org/souris.htm ) (this is a link in French but I guess this site exists in English)), and he used *very large fonts* to read/write anything on screen. Here comes the difference with a paper book, Max : with "standard-height" characters you cannot read, but you can with "2cm-height" characters. Now just imagine reading/writing your *whole* book (or *any* technical book BTW) that way... Hence my admiration for such guys. They just amaze me, and they really deserve all our support.
Sorry guys for this post. I understand that it touches *me* particularly *just* because such issues were a part of my personal story for a few years. So well, let's say that I just shared a personal experience with you.
Best regards,
Phil.
Max Habibi
town drunk
( and author)
Sheriff

Joined: Jun 27, 2002
Posts: 4118
I was under the impression that there were readers that would automatically convert e formats (including pdf) to audio.
M
Philippe Maquet
Bartender

Joined: Jun 02, 2003
Posts: 1872
You're probably right, Max but ... I really don't know. I guess it really depends on the extend of the "almost" above. Anyway, I know that Jacques is now sleeping (it's 1 AM in South Africa as in Europe and ... I should do the same BTW ), but we'll probably know more tomorrow.
It's nice to see you back on this forum, Max , hope you'll *stay* with us.
Best,
Phil.
Philippe Maquet
Bartender

Joined: Jun 02, 2003
Posts: 1872
Hi Max,
I was under the impression that there were readers that would automatically convert e formats (including pdf) to audio.

Confirmed ! I just found this on Google : http://access.adobe.com .
Thanks,
Phil.
Jacques Bosch
Ranch Hand

Joined: Dec 18, 2003
Posts: 319
I was under the impression that there were readers that would automatically convert e formats (including pdf) to audio.

Yes there are tools, like the Adobe link Phil found. But in lot's of cases these tools leave a lot to be desired. The problem usually comes in with a PDF file's security. If text can't be copied to the clipboard, then it makes things quite a bit harder even with the accessibility features. I haven't played around much with the new version 6 stuff though. But I think it's getting better all the time.
" Almost blind" in my case means I can move arround just fine without any hassle, and do most things without a prob, but I'm not allowed to drive, can't read any normal text or print. 5 cm to 8cm size letters start becoming readable to me, but by that size only one or two words fit on the screen. I would go insane if I had to read everything with my eyes. I depend on a screen reader very heavily. Have about 5% to 10% vision, although it doesn't really translate to percentages very well.
I use a screen magnifier and screen reader called Zoomtext, http://www.zoomtext.com/index.htm, which is awesome. Quite pricy though at $600.
See ya guys.
Jacques
Derek Canaan
Ranch Hand

Joined: Nov 05, 2003
Posts: 64
Hats off to you, Jacques.
 
 
subject: NX: More interface confusion.