directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Horia Muntean <horia.munt...@gmail.com>
Subject Re: Session Idle time not working
Date Wed, 08 Jun 2005 10:44:41 GMT
I have moved the idle time configuration inside sessionOpened
callback, but I get the same result: the telnet session is not
terminated and sessionIdle is not called.
<code>
    public void sessionOpened(ProtocolSession session) throws Exception {
        logger.debug("session opened");
        session.getConfig().setIdleTime(IdleStatus.BOTH_IDLE, 5);
        logger.info("Idle time
is:"+session.getConfig().getIdleTime(IdleStatus.BOTH_IDLE));
    }
</code>

All I get is :
2005-06-08 13:45:39,171 DEBUG CLIENT - session created
2005-06-08 13:45:39,187 DEBUG CLIENT - session opened
2005-06-08 13:45:39,187 INFO  CLIENT - Idle time is:5

Regards,
Horia
On 6/8/05, Julien Vermillard <jvermillard@archean.fr> wrote:
> Le mercredi 08 juin 2005 à 13:00 +0300, Horia Muntean a écrit :
> > Hello,
> >
> > I was trying to configure a session to close itself in case of idle
> > time expiration. I am using mina-0.7.2.jar (grabbed from
> > http://cvs.apache.org/repository/directory-network/jars/) on a WinXP
> > box. The code follows:
> > <code>
> >     public void sessionCreated(ProtocolSession session) throws Exception {
> 
> Hi,
> 
> Try to do that in sessionOpened (it works for me). Anyway I reconize
> it's a trap, perhaps it shoudl throw somekind of exception if you
> configure the session IDLE before it was opened ?
> 
> Julien
> 
> 
> 
>

Mime
View raw message