Hi, Anderson Guo,

Thanks for your reply.

As you guess, my connection is a long-term connection and I hope it can recover 
as soon as the computer resumes from a standby mode.

In standby mode, I think all programs and connections would go to sleep and 
also the heart-beat detection mechanism.

I want to know if there are some parameters (e.g. mina parameters, java vm 
parameters, or os parameters), which calculate the time limit of the connection 
becoming invalid.

Regards,

Li



> Subject: RE: About the time limit of connection keeps valid from standby mode
> Date: Thu, 11 Sep 2008 13:50:05 +0800
> From: [EMAIL PROTECTED]
> To: [email protected]
>
> I am not sure if I understand your issue, but I would like to share my 
> opinion with you about it:
>
> First of all, Mina is suitable for both long-term and short-term connection 
> oriented programming. Long-term connections means lifetime of the connection 
> will last from begin to end, usually the communication protocol should has 
> operations that responsible for session create, session keepalive, session 
> close. On the other hand, short-term connections, just like http connections, 
> created before http request is issued, till received corresponding http 
> response. (But for the purpose of performance, most programmer choose to open 
> keep-alive option to maintain the http connection between client and server).
>
> Second, network related exceptions really exists during the communication 
> phase, no matter what kind of connection manner you adoptm, so MINA provides 
> exception listener method to allow programmers to process exception condition 
> and recovery from it. Limited-retry , forget and continue are most popular 
> approaches to handle such cases.
>
> Finally, MINA is java-based network programming framework in nature, there is 
> no way to know whether computer system is waken up from sleep mode. So I 
> suggest the method to deal with connection invalid case is just encapsulate 
> your source code to detect network io exceptions and try to resend your 
> information again.
>
> BTW, you mentioned that you connection maybe last for about 10 minutes, 
> therefore I guess that program written by you is towards long-term 
> connection, so please also adopt heart-beat detection mechanism inside you 
> software.
>
> Best Regards
> Anderson Guo
>

_________________________________________________________________
【女性版ビリー?】話題の自宅燃焼系!美しく健康的なくびれをゲット!
http://clk.atdmt.com/GBL/go/112813569/direct/01/

Reply via email to