Click here to Skip to main content
14,662,846 members
Rate this:
Please Sign up or sign in to vote.
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

Rate this:
Please Sign up or sign in to vote.

Solution 1

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.
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100