• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Correct RMI behaviour, or RMI bug?

 
Ranch Hand
Posts: 119
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Please enjoy this holographic presentation of our apocalyptic dilemma right after this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic