directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Horia Muntean (JIRA)" <>
Subject [jira] Created: (DIRMINA-58) Session Idle time not working
Date Wed, 08 Jun 2005 11:24:30 GMT
Session Idle time not working

         Key: DIRMINA-58
     Project: Directory MINA
        Type: Bug
    Versions: 0.7.2    
 Environment: WinXP SP2, java version "1.5.0_03"
    Reporter: Horia Muntean
 Assigned to: Trustin Lee 

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
 The code follows:
   public void sessionCreated(ProtocolSession session) throws Exception {
       logger.debug("session created");
       session.getConfig().setIdleTime(IdleStatus.BOTH_IDLE, 5);

   public void sessionIdle(ProtocolSession session, IdleStatus arg1) throws Exception {
       logger.debug("session idle");

Then I have just opened a telnet connection to the server and waited
for the connection go be cut off by the server but notging happens.
BTW, when I popup my telnet connection, sessionCreated and
sessionOpened are getting called on the server side.

As Julien Vermillard suggested, I was trying to move the idle time configuration inside sessionOpened
callback, but I get the same result: the telnet session is not terminated and sessionIdle
is not called.
   public void sessionOpened(ProtocolSession session) throws Exception {
       logger.debug("session opened");
       session.getConfig().setIdleTime(IdleStatus.BOTH_IDLE, 5);"Idle time is:"+session.getConfig().getIdleTime(IdleStatus.BOTH_IDLE));

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

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message