directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niklas Therning <>
Subject Re: MINA FactoryBeans
Date Fri, 23 Dec 2005 07:42:17 GMT
Chris Allen wrote:
> Oh and the 5 minutes thing.  Yes, but I could be misinterpreting what
> that value really means.  What I want really is to maintain state on
> that connection forever.  Is there a way to actually have an
> indefinitely connected socket connection, rather than just a really long
> one?  I wouldn't want to have to go off and on with a Jabber client as
> this will affect the clients presence for other users.

The connectTimeout is just the timeout after which the connect() call
will fail. The semantics are exactly the same as for the timeout value
specified in, int) except that
Socket.connect() blocks while SocketConnector.connect() doesn't.

What you want is some kind of keep alive, right? Is there some message
in the Jabber protocol that you could use for that? If there is you
could override the sessionIdle() callback in IoHandler and send the keep
alive message after the connection has been idle for some time. Just
don't forget to set the idle timeout on the session (e.g. in
sessionCreated()) using IoSession.setIdleTime().

We have plans to implement a ReconnectFilter for MINA. There is a patch
in JIRA but it hasn't been applied yet. It may be used to automatically
reconnect a session which has been closed.


> On 12/22/05, *Niklas Therning* <
> <>> wrote:
>     Niklas Therning wrote:
>     > ...
>     > ConnectFuture for an example. And your current connectTimeout in the
>     > Spring case is 6 minutes. Is that intended?
>     What I really meant was 5 minutes of course! ;)
>     /Niklas

View raw message