From dev-return-6269-apmail-directory-dev-archive=directory.apache.org@directory.apache.org Thu Jun 09 01:07:26 2005 Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 24900 invoked from network); 9 Jun 2005 01:07:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Jun 2005 01:07:26 -0000 Received: (qmail 22569 invoked by uid 500); 9 Jun 2005 01:07:24 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 22508 invoked by uid 500); 9 Jun 2005 01:07:24 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 22483 invoked by uid 99); 9 Jun 2005 01:07:24 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from ajax-1.apache.org (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 08 Jun 2005 18:07:20 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 6BF9513 for ; Thu, 9 Jun 2005 03:07:15 +0200 (CEST) Message-ID: <341890224.1118279235440.JavaMail.jira@ajax.apache.org> Date: Thu, 9 Jun 2005 03:07:15 +0200 (CEST) From: "Trustin Lee (JIRA)" To: dev@directory.apache.org Subject: [jira] Resolved: (DIRMINA-58) Session Idle time not working In-Reply-To: <1859612297.1118229870089.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DIRMINA-58?page=all ] Trustin Lee resolved DIRMINA-58: -------------------------------- Fix Version: 0.7.3 Resolution: Fixed Mike, thanks for giving us a great clue for this issue. I checked in the fix and deployes 0.7.3-SNAPSHOT JAR. Horia, could you please test it and close this issue? Trustin > Session Idle time not working > ----------------------------- > > Key: DIRMINA-58 > URL: http://issues.apache.org/jira/browse/DIRMINA-58 > Project: Directory MINA > Type: Bug > Versions: 0.7.2 > Environment: WinXP SP2, java version "1.5.0_03" > Reporter: Horia Muntean > Assignee: Trustin Lee > Fix For: 0.7.3 > > 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/). > The code follows: > > public void sessionCreated(ProtocolSession session) throws Exception { > logger.debug("session created"); > session.getConfig().setIdleTime(IdleStatus.BOTH_IDLE, 5); > session.getConfig().setWriteTimeout(5); > } > public void sessionIdle(ProtocolSession session, IdleStatus arg1) throws Exception { > logger.debug("session idle"); > session.close(); > } > > 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); > logger.info("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: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira