• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

do we provide for record deleting ?

 
Kathy Shkarlet
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
If we don't change the provided FBN Data class, it's possible to have record deleted while clients are locked on it. I'm curious how people handled this situation... All responses are appreciated.
 
Jerry Pulley
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kathy,
I required a lock on a record in order to delete it. As for changing the Data class, I put all the locking behavior in a separate class that checks the lock before delegating to Data (actually, it delegates to a subclass of Data), and made no changes to Data beyond repairing deprecated method calls.
jply
 
Kathy Shkarlet
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jerry,
My requirements stated 'you may do this by modification or subclassing", so I decided delegation was out of the question.
Are you saying you did it and passed?
Kathy
 
Jerry Pulley
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kathy,
I haven't submitted my assignment yet - still a lowly SCJP. From what I can tell, you can do pretty much anything and pass, provided you have a justification for it.
jply
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic