This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Distributed Java and the fly likes RMI - strange lease signals Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI - strange lease signals" Watch "RMI - strange lease signals" New topic

RMI - strange lease signals

Eric Janssens
Ranch Hand

Joined: Sep 26, 2005
Posts: 53
I don't have any real trouble (apparently) but I am curious:

Why, after settings my remote object reference in my client to null, does my client and server continue to communicate actively?
In fact, it only stops when the remote object will be effectively clean on the server.

I am running the client and server on the same machine and I am using Eclipse and jre1.5.0_09 as environment.

My for the RMI server are:
System.setProperty("java.rmi.dgc.leaseValue", "10000");
System.setProperty("java.rmi.server.logCalls", "true");

The remote object is a dynamic proxy. (no rmic)

The log on the server side:

The reference to the remote object is set to null just after dummyMethod() call.
All other rmi references have been set to null long time ago. (Registry and Factory)
rmi.unreferenced.MyRemoteInterface is my define interface for RMI.
rmi.unreferenced.MyRemoteObject is the UnicastRemoteObject implementing it.
The last message is the result of the call to unreferenced() on the remote object.

Why so much activity on the log between the dummyMethod() call and the unreferenced() call ? (I can understand one but four )

ps: my aim is to better understand RMI for my SCJD implementation not to complain about anything. I will put my code latter if it is not a known behavior
[ October 28, 2006: Message edited by: Eric Janssens ]
I agree. Here's the link:
subject: RMI - strange lease signals
It's not a secret anymore!