Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

unreferenced() called on Windows, but not on Linux

 
Cornell Buzian
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Anyone might have a clue of why this happens?

I have on the server
System.setProperty("java.rmi.dgc.leaseValue", "10000"); // 10 secs
System.setProperty("sun.rmi.dgc.checkInterval", "5000"); // 5 secs

My factory DBAdapterFactory is bound to the registry and it has a method getClient to allow retrieving a Remote implementation object DBAdapterRemote; this DBAdapterRemote implements also the Unreferenced interface.

On Windows platform, everything works as expected, the unreferenced method is called within the 10 secs after the client disconnects from the server. On linux (Suse 9.x) platform, this doesnt happen even after 15 mins. On both platforms, the connection was done locally - server and client on the same machine. There is a difference in the java version used on the two platforms, 1.5 on Windows and 1.6 on linux, but I doubt that would be the cause...

Why so? Any ideas?

Thanks
 
Cornell Buzian
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, I figured it out...

A call to
System.gc();
on the client side at the disconnect time does the trick...

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic