本文介绍了错误/故障注入示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有任何错误/错误注入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.
推荐答案客户端非常安全 - 将继续运行,您只需重新建立连接。 要检测丢失的连接,你可以使用心跳或数字,如果你正在进行的常规连接不起作用(比如用服务器的数据更新某些表) 。 服务器 - 您需要将服务器应用程序包装在Windows服务中。 YAJSW [ ^ ]非常好,简单且效果很好。 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.
更多推荐
错误/故障注入示例
发布评论