• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

URLYBird: Exceptions

 
donal horgan
Ranch Hand
Posts: 54
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone tell me what the DuplicateKeyException is about in the URLYbird project.
In what sitaution does this exception occur?

Also -- what is the SecurityException about?
 
Tom Henricksen
Author
Ranch Hand
Posts: 136
Eclipse IDE jQuery Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Donal,
This looks like a common question if you search around here. This was one of the better answers I saw. I am doing the B&S and this is also question I had too.

http://www.coderanch.com/t/186868/java-developer-SCJD/certification/DuplicateKeyException

For the SecurityException my assignment says "Throws SecurityException if the record is locked with a cookie other than lockCookie." So I check the cookies and if they don't match throw the exception.

Thanks,
Tom
[ August 24, 2005: Message edited by: Tom Henricksen ]
 
Thomas Paul Bigbee
Ranch Hand
Posts: 71
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no such thing as a DuplicateKeyException - because there is no key. The interface being used is from a previous assignment from years ago, they just reused the interface, in the old project you wrote the record number back to the database (the record number being the key), so in fact you could have a duplicate key if you read the max record number, incremented it and tried to write it back (at the same exact time as someone else creating a new record), URLYBird, has no physical keys (record numbers), only logical keys (row numbers). I did not implement this exception because there was no way to throw it.

As for the SecurityException, its not in my version of URLYBird.

Hope this helps
Tom
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic