This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
1. start RMI server
2. run network client
3. do something eg search/book etc
4. stop server
5. do something -> got ConnectException and NOT EXIT APP
6. start server again
7. do something -> still get ConnectException
Why is this? I use a service layer in between client and server. When I start my client, I have a getService method to get the server/database instance. Then I pass this parm to my other objects.
Stopping the server severs the link you had when you started your client (proxy/stub relationship). So restarting the server won't reconnect this
link and so after stopping and restarting the server you still need to restart the client to reconnect the link. At least this is my understanding and
is also the way my code works.