Hi,

I'm trying to implement simple keep alive using Mina's session idle feature.
I'm using mina 2.0.1 on ubuntu 64bit with jdk 1.6.0_25.

1. What is the difference between setting the idle time like this:
connector.getSessionConfig().setBothIdleTime(5);
and like this:
session = future.getSession();
ioSessionConfig sessionConfig = session.getConfig();
sessionConfig.setBothIdleTime(5);

2. When I set idle time to 5 seconds and keep the channel idle I can see
that idle callback is called irregularly: every 5, 6, even 7 seconds.
Is it normal?

3. When the session is closed do I have to set the idle time to 0 to stop
the idle callback?

4. I can see that the idle callback is being called from NioProcessor. Does
it mean that I should not write anything to the session in that thread?

thanks,
Irek

Reply via email to