File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI - strange lease signals" Watch "RMI - strange lease signals" New topic
Author

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 System.properties 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: http://aspose.com/file-tools
 
subject: RMI - strange lease signals
 
Similar Threads
Question on rmiregistry
SunOne7 ejb deployment error
RMI Server Hang
java.rmi.NoSuchObjectException
problems configuring java.util.logging