Hi Flavio,
I've tried wainting 10 minutes, and it works this way. Thanks for helping. Do you know how I change this timeout?
You can try:
System.setProperty("java.rmi.dgc.leaseValue", "10000");
(Or set it at the command line)
This will set the timeout to 10 seconds - very useful when
testing your code.
However I would not change this value in your final submission (or at least, leave it at the default value, and allow the user to modify it if they wish). There are messages sent over the network at the halfway point of the lease expiration (so at 5 seconds in my setup), and if you have a lot of clients connected then this could generate a lot of unnecessary network traffic. Plus you may inadvertantly loose connections over a WAN because of network latency.
Regards, Andrew