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

Add an entry in FAQ explaining how to correctly close a session and dispose the connector

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-RC1
    • Fix Version/s: 2.0.0
    • Component/s: None
    • Labels:
      None

      Description

      Many people are complaining about the fact that their program is hanging when they try to close a session and dispose the connector in the listener this way :

      CloseFuture closeFuture = cf.getSession().getCloseFuture();
      closeFuture.addListener((IoFutureListener<?>) new IoFutureListener<IoFuture>() {

      @Override
      public void operationComplete(IoFuture future)

      { connector.dispose(); // This will hang ! }

      });

      // wait for session close and then dispose the connector
      closeFuture.getSession().close(false);
      closeFuture.awaitUninterruptibly();

      We have to explain in the FAQ that the dispose must not be put in the listener.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              elecharny Emmanuel L├ęcharny
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: