Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Java
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 7-Feb-13 16:57pm

1 solution

Rate this: bad
good
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.
  Permalink  

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

  Print Answers RSS
0 Kornfeld Eliyahu Peter 265
1 Sergey Alexandrovich Kryukov 202
2 George Jonsson 185
3 King Fisher 185
4 CPallini 155
0 OriginalGriff 6,223
1 DamithSL 4,724
2 Maciej Los 4,196
3 Kornfeld Eliyahu Peter 3,894
4 Sergey Alexandrovich Kryukov 3,496


Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 8 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

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