Hi guys, I have experimented on the Unreferenced interface. I realized that when my dummy
test client disconnects, sometimes unreferenced() is called, but sometimes it doesn't. Even during the times when it doesn't, it gets called after 15 minutes due to the lease. However, the strange thing is that on the dummy test server, I ran a
thread that calls System.gc() every 10 seconds. No matter what, the garbage collector never seem to call the unreferenced() method. Why? In the first place, is System.gc() the correct method to call?
Another thing, in my unreferenced() method, do I have to add in any cleanup codes like UnicastRemoteObject.unexport(this, true) or anything similar?
[ February 06, 2005: Message edited by: Liang Anmian ]