Click here to Skip to main content
11,716,249 members (86,178 online)
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 15: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 Sergey Alexandrovich Kryukov 599
1 Richard MacCutchan 280
2 Maciej Los 275
3 OriginalGriff 160
4 F-ES Sitecore 145
0 Sergey Alexandrovich Kryukov 1,003
1 Richard MacCutchan 430
2 CHill60 415
3 Maciej Los 399
4 OriginalGriff 385


Advertise | Privacy | Mobile
Web03 | 2.8.150901.1 | Last Updated 8 Feb 2013
Copyright © CodeProject, 1999-2015
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