Hi, Maarten Bosteels wrote: > Hello Daniel, > > On Feb 18, 2008 4:54 PM, Daniel Cheng <[EMAIL PROTECTED]> wrote: > >> Hi list, >> >> MdcInjectionFilter fails on nested call. It assume only one IoSession on >> a thread at any time. > > > yes, that might be an issue, not sure, I will investigate it. > Which session info would you expect to be in the MDC, both ? >
The latter MdcInjectionFilter should not remove all keys in MDC. I think it should behave like a stack. If you try my program, the "BUG HERE" line have no MDC at all. >> See attached source for a test case. You need both port 21 and 22 open >> on localhost to run the test case. If you can't open the attachment, try >> http://www.sdiz.net/temp/MainTest.java >> >> (btw, checkDeadlock() in await() think I have a deadlock when I remove >> the Thread.sleep() call on line 39 ... is this bug?) > > > I don't think so. > Instead of using cf.await() you should use an IoFutureListener: > [....] okay. I wrote this case just to demonstrate the MDC bug... I never do this in my applications. But the exception from checkDeadlock() is misleading, as this case have no deadlock at all. > This also solves the MDC problem. Sure. But this MDC problem is much more common. Consider an application-level packet router.. It always have to send packets from one session to another.. > > Maarten > Daniel Cheng
