You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Trustin Lee (JIRA)" <ji...@apache.org> on 2005/06/07 02:28:40 UTC

[jira] Commented: (DIRMINA-54) ProtocalSession begins reading(decoding) before the session has been opened

    [ 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