This week's book giveaway is in the OCAJP forum. We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line! See this thread for details.
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 ]