Uploaded image for project: 'MINA'
  1. MINA
  2. DIRMINA-535

Session creation/opened callbacks are not called at logical times

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 2.0.0-M1
    • 2.0.0-M2
    • Core
    • None

    Description

      The IoHandler.sessionCreated and IoHandler.sessionOpened methods are not called at useful times. The sessionCreated method should be called after the session is constructed but before anything else is done. The sessionOpened method should be called immediately after the connection is established, but before any messages are received (in other words, before the selectionkey is added to the selector).

      From the look of the code in AbstractPollingIoProcessor, it looks like sessionOpened is simply called immediately after sessionCreated (see IoServiceListenerSupport.fireSessionCreated()), rendering the separate methods useless. In addition, it seems that there is nothing preventing a message from coming in before this initialization is complete, unless I am misunderstanding what threads are operating on these constructs.

      Attachments

        Activity

          People

            trustin Trustin Lee
            dmlloyd David M. Lloyd
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: