Hi Batista -
Are you using sockets or rmi?
On RMI I can comment:
The application doesn't hang. You get a
. But it takes some time (around 1 min maybe which is adjustable.)
Usually you do something like this to get the remote object:
But when you try with google:
it appears to be hanged... but you get a
after a while.
java.rmi.ConnectException: Connection refused to host: www.google.com; nested exception is:
java.net.ConnectException: Connection timed out: connect
Even with proper RMI Server there maybe a time lag if it's a remote machine and network traffic is high.
So I think
you should change the mouse cursor to Hour-Glass informing the user that we are waiting for the server to respond and change it back when we get a response or exception.