在MIDAS应用服务器中,怎样发现客户不正常断线从而终止对应的线程?(300分)

X

xiaoyu

Unregistered / Unconfirmed
GUEST, unregistred user!
请教各位大虾:
有时客户端不正常断开,而应用服务器仍在傻傻的等,用什么
方法可以让应用服务器变得聪明起来呢?
 
DCom的好像不行,如果客户端异常退出可能导致服务器资源无法释放。
Corba的可能可以,回去找找这方面的资料看看。
 
我用socket开发基于web的应用(Intranet),我想肯定是可以实现的,比如说
让服务器每隔一段时间给客户端发送一条信息,客户端相应,如果没有响应就
认为客户端出现异常了,就可以终止相应的进程。这个想法可以吗?
我觉得这是一个很有实际意义的问题,请大家共同讨论,共同提高。
 
摘自Delphi Help:
To connect to remote application servers using DCOM, use the
TDCOMConnection component To connect client applications to remote
application servers using TCP/IP sockets, use TSocketConnection
instead. To connect client applications to remote application servers
using OLEnterprise, use TOLEnterpriseConnection. To connect to remote
application servers using CORBA, use the TCORBAConnection component.
Using Socket connections
......
When using sockets, there is no protection on the server against client systems failing before they release a reference to interfaces on the application server. While this results in less message traffic than when using DCOM (which sends periodic keep-alive messages), this can result in an application server that can抰 release its resources because it is unaware that the client has gone away.
而Using DCOM connections, Using OLEnterprise, Using CORBA
connections 都能 fail-over,
所以,结论就是不要使用:Socket connections
 
Waitting for my email...
 
xWolf:please give the conclusion with more details,how to fail-over
Using DCOM connections, Using OLEnterprise and Using CORBA
connections.
xfma:what's your email about?please send it to me.
 
xiaoyu说的在理。
>>
 
好象只有Socket不行吧,我试过强行关闭客户端,DCOM是可以注销进程的,CORBA不
清楚。
使用SOCKET出现问题,首先scktsrvr.exe就释放不了。
 
看来是没有办法喽,或者是高手尚未出现?
我就是需要用socketconnection,还是凑合着吧!
 
我也遇见和你一样的问题。SCKTSRVR.EXE释放不了。
能告诉我 HOW TO “让服务器每隔一段时间给客户端发送一条信息,
客户端相应,如果没有响应就认为客户端出现异常了,就可以终止相应的进程。”
THANK YOU VERY MUCH :-)
 
xixi12359:
关键就在于我不知道怎样安全地减少XXX计数,终止服务器进程。
不过我发现出错的时候并不多,发现时手工kill之,可以忍受。
 
设置 scktsrvr.exe 的 timeout 即可搞定,简单方便!
值300分吧?
 
谢谢xfma,想不到可以用这么简单的方法解决问题。
本来我正考虑用WebConnection呢!
结账喽!
 
顶部