Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 51790 invoked from network); 7 Jun 2005 00:28:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Jun 2005 00:28:55 -0000 Received: (qmail 4649 invoked by uid 500); 7 Jun 2005 00:28:54 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 4573 invoked by uid 500); 7 Jun 2005 00:28:53 -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 4556 invoked by uid 99); 7 Jun 2005 00:28:53 -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; Mon, 06 Jun 2005 17:28:50 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 012BE181 for ; Tue, 7 Jun 2005 02:28:40 +0200 (CEST) Message-ID: <1120089379.1118104120003.JavaMail.jira@ajax.apache.org> Date: Tue, 7 Jun 2005 02:28:40 +0200 (CEST) From: "Trustin Lee (JIRA)" To: dev@directory.apache.org Subject: [jira] Commented: (DIRMINA-54) ProtocalSession begins reading(decoding) before the session has been opened In-Reply-To: <375006589.1118094940230.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-54?page=comments#action_12312809 ] Trustin Lee commented on DIRMINA-54: ------------------------------------ Doesn't ProtocolDecoder.decode() provide ProtocolSession as a parameter? Protocol codecs exists between I/O layer and Protocol layer, and they can be called before sessionOpened(ProtocolSession) is called. If you want to set something up before all I/O starts, you can implement sessionCreated(ProtocolSession) handler method. By the way, sessionCreated(ProtocolSession) is not being called due to its bug. I'll fix it as soon as possible and comment here. Thanks, Trustin > ProtocalSession begins reading(decoding) before the session has been opened > --------------------------------------------------------------------------- > > Key: DIRMINA-54 > URL: http://issues.apache.org/jira/browse/DIRMINA-54 > Project: Directory MINA > Type: Bug > Versions: 0.7.1 > Environment: windows xp using TCP/IP > Reporter: Daniel Fellars > Assignee: Trustin Lee > > With a local connection, I have seen it over the network but not as often, MINA regularly will call the Decoder.decode(..) method before it calls ProtocolHandler.sessionOpened > Inside the decode, I use the protocolSession attachment, which is set in the ProtocolHandler.sessionOpened > so on these occassions, i am unable to read properly because my attachment object is not available. > I have an ugly hack for my needs that requires synchronizing on the protocolsession in both methods, but would think that MINA should properly manage the lifecycle to gaurantee that sessionOpened is always called before any read/writes on the protocolsession. -- 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