David Rosenstrauch wrote:
I'm trying to add a close listener onto a session, and perform some processing after the session close is completed. i.e.:

...
        CloseFuture closeFuture = session.getCloseFuture();
        closeFuture.addListener(new CloseSessionListener());
        session.close(closeImmediately);
...

    class CloseSessionListener implements IoFutureListener<CloseFuture> {
        public CloseSessionListener() {
System.out.println("creating CloseSessionListener");
        }
        public void operationComplete(CloseFuture future) {
System.out.println("close operation complete");
            getServerControl().shutDown();
        }
    }

This works fine on a live system:

creating CloseSessionListener
close operation complete

But when I unit test using a DummySession, I never get notified about operationComplete:

creating CloseSessionListener

I also tried adding a new filter to the end of the session's filter chain, but that's never getting notified about the session close either.

Any idea what gives?  I'm using 2.0.0-M4.

have you added a filter in the associated chain ?

--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org


Reply via email to