Thanks for all replies.

I think I have got the answer although a little regret.

Li


> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: Re: About the time limit of connection keeps valid from standby mode
> Date: Thu, 11 Sep 2008 15:23:36 +0800
>
> I agree with Anderson .
>
> ----- Original Message -----
> From: "Wenrui Guo" 
> To: 
> Sent: Thursday, September 11, 2008 3:19 PM
> Subject: RE: About the time limit of connection keeps valid from standby mode
>
>
> Hi, Li
>
> I wonder if you understanding my explanation. But in order to make the 
> question more clear, I will just focus on the proposal you mentioned.
> First, there is no parameter that control the validation of socket connection 
> (Maybe some OS experts will challenge me, but please forget it because you 
> can't use it in Java Runtime Environment) .
> Second, even if you could retrieve the parameter, you can't ensure the 
> connection must change to invalid(close) at that moment, so your solution is 
> impossible to apply. For the case, as I said before,
> Just write your exception handling code and retry.
>
> BR
> anderson
>
> -----Original Message-----
> From: li [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 11, 2008 2:47 PM
> To: [email protected]
> Subject: RE: About the time limit of connection keeps valid from standby mode
>
>
> 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/

_________________________________________________________________
Hotmail をお使いの皆様だけに低価格ブロードバンドサービス!
http://campaign.live.jp/eaccess/Top/

Reply via email to