• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Correct RMI behaviour, or RMI bug?

 
Liang Anmian
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

Need a bit of clarification on a certain RMI behaviour that I found. I'm not sure if this is a feature or a bug. Basically, my DBSessionImpl class (unique for every client) has a close method which looks something like this:



When I run the application, I noticed that if my client calls the close method, unreferenced will never be called (this class implements Unreferenced)! If my client exits without calling close, unreferenced will be called after 10 seconds (I set the lease to 10 seconds). I like this behaviour, but I'm not sure if this is the correct RMI behaviour.

Comments?
[ April 23, 2005: Message edited by: Liang Anmian ]
 
Frans Janssen
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Liang,

I am no RMI expert (know just enough to pass the exam ), but I have a guess that you may want to consider.

I guess that the unexportObject makes that your remote object is no longer behaving as such. And that also means that it no longer can detect whether any references from remote clients exist.

Perhaps someone more knowledgeable in RMI kan confirm or deny this?

Frans.
 
Liang Anmian
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is exactly what I thought too, since Unreferenced can only detect existance of remote client. But I just want to confirm that this is the expected behaviour, as I certainly do not want my application to rely on a bug to function.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic