Hello Omar !!!
I had the same problem. It happens when you run the send application, in the main you invoque the method obj.writeObject three times and then
terminate, and this automatically "reset" the connection with the receive application.
You only have three write's , if you put more write's the receive application will continue.
I hope resolve your problem !!
Curna.