• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX: A Question for Max Habibi...

 
Markus M�ller
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Max,
Regarding all those Discussions about the work-around of a client-gui-crash case (I mean using WeakHashMap or implementing the rmi Unreference interface), I also appreciate your choice of WeakHashMap.
But what would you concretely use as the "key" while calling the method
put(Object key, Object value) of that map object.
The "value" could be for example the recordNumber wrapped by a Long instance (new Long(recordNumber)), am I right?
But what about the key , I mean that must be something specific to the client's connection, so that recordNumber can be derefernced from the map, as soon as the connection is broken. but what could be that client-specific-uniqe-id.
Thanks
Markus
[ December 18, 2003: Message edited by: Markus M�ller ]
[ December 18, 2003: Message edited by: Markus M�ller ]
[ December 18, 2003: Message edited by: Markus M�ller ]
 
Bill Robertson
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
FYI - I believe Max no longer posts at this site. He left a few months
ago for something else. I forget what for. But I do believe he will
be back.
 
Max Habibi
town drunk
( and author)
Sheriff
Posts: 4118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Markus,
That really depends on your design, but one scenario might be returning a Long which the client is given reference to. This would be the lockOwnerID. That way, when the client dies, the references dies with it, and the domino effect eventually ques the gc to collects the errant record.
That being said, I'm of the opinion( just my opinion, of course, I'm not speaking for Sun here), that the Sun graders don't really care about the lost connection aspect of the project. It's not a part of the requirements, and probably not something you can reasonably be graded on. While it might be a good idea in a real application, I probably wouldn't start looking at it until everything else was completed. And even then, I would hesitate to implement it. As I tell me martial arts students, your goal is to win the fight, not prove that you're better/faster/smarter --though you probably are
Good luck,
M
 
Markus M�ller
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Max Habibi:
Hi Markus,
As I tell me martial arts students, your goal is to win the fight, not prove that you're better/faster/smarter --though you probably are
M

Hi Max,
That philosophy is really reasonable!
Thanks alot.
Markus
 
Bill Robertson
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic