• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX Contractors: Handling deadlocks from client crashes

 
Ramses Tutoli
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've read through some of the older topics and have a HUGE headache now. Can someone explain the best way to do this?
I don't understand completely how to use the Unreferenced interface. If there are 2 clients with references to the remote object, but client A crashes, then Unreferenced still wouldn't be called because client B still has a reference to it (the remote object), right? So what's the point? Or is my understanding completely wrong?
Also, to use WeakHashMap you need to keep the thread name as a key right? Well then if I put the record number as the value, where do I store the freakin' cookie? Or do I have to create another class just to put the recNo and cookie as the value to the WeakHashMap?
Damn, what a headache I have...
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"If there are 2 clients with references to the remote object"
That is where you have your headache. In the design of your Application, you need to have only one client to one remote object. So that is that client crashes Unreferenced will be called. This one to one relationship is what we refer to here as the "Connection" object design.
Do a search on this forum for Connection and you will find a plethora of posts.
Good Luck.
Mark
 
Max Habibi
town drunk
( and author)
Sheriff
Posts: 4118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ramses Tutoli:

Also, to use WeakHashMap you need to keep the thread name as a key right?

No! There's a detailed explanation of all of this. Search for my posts regarding same.
All best,
M
 
Ramses Tutoli
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark, when I search for "Connection" I get about 1000 hits of unrelated topics. It's too general. I'm only confused because I thought there was only one remote object, and all clients have to connect through it.
Max, I will try to do that, thanks. Do you have any specific threads you are referring to?
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic