On Thu, Feb 12, 2009 at 7:32 AM, David Rosenstrauch <[email protected]> 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. > > Thanks, > > DR >
have you added a filter in the associated chain ? -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com
