Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Are there any examples of error/fault injection java source code? Specifically, I have a client-server application. The system must be able to handle a server crash and begin running from the point in which it ended. Thus, I must have a mechanism for starting a clean system as well as a system that has just recovered from a crash. The client and server will display their activities to the screen and contain a logging mechanism.
Posted

1 solution

The client is pretty safe - that will keep running, you just need to reestablish the connection.
To detect the lost of connection you can use a "heartbeat" or figure if a regular connection you're making is not working (like updating some table with server's data).

The server - you need to wrap the servers application in a windows service. YAJSW[^] is pretty good, simple and works great.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900