mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Butler <crodste...@yahoo.com>
Subject Re: Session close problem
Date Fri, 23 Mar 2007 15:44:28 GMT
See response in-line

----- Original Message ----
From: Michael Bauroth <michael.bauroth@falcom.de>
To: dev@mina.apache.org
Sent: Friday, March 23, 2007 9:45:38 AM
Subject: Re: Session close problem

Hi once more,

no one else has another idea about this?


Michael Bauroth schrieb:
> Hi,
> I'm using currently the trunk version of Mina. I use it to communicate 
> with GPRS devices on the other side. In most cases this works very well!
> But sometimes the things become strange. I've collected a bunch of 
> problems where I would need help / advices / ideas.
> 1. I call session.close() from inside my server. It seems, that the 
> session doesn't close as required.

Are you calling join afterwards?


Session close is asynchronous.  It may simply be that your session hasn't closed by the time
your attempt to do something else with the session.  It will close eventually but it can take
a little time.  (probably a couple of seconds at the most)

> 2. I close the session. The GPRS device on the other side continues to 
> send data and seems to get ACKs too. It doesn't recognize, that the 
> other side of the connection (the server) has closed the session a while 
> before. It seems that there is something in the middle which responds 
> the ACKs even with not opened server session.

I asked a friend with a lot of cell experience about this.  According to him the gateway devices
can be configured in two modes.  In one of these modes the gateways can keep connections open
to a mobile device for some period of time.  (I have no idea how long.) This is helpful when
the mobile device connectivity comes and goes as the device goes in/out of radio range.

If your client needs to know that it is no longer connected you may need to implement some
application level logic.  Perhaps you could send the client a "goodbye" message before closing
the connection on the server.

> Knows anybody one of the two (most painful) problems and has an answer 
> for me?
> Best Regards
> Michael

The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing.

View raw message