David Rosenstrauch wrote:
David Rosenstrauch wrote:
Emmanuel Lecharny wrote:
have you added a filter in the associated chain ?
??  See the end of my message:


Ooops... Seems like I just looked at the code snippet.

Could you post the complete code so that we can tets it ?

Thanks !

OK. It's tied up with some proprietary code right now, but I'll try to trim it down to an isolated test case and post it.

Thanks,

DR

Try this:

http://www.darose.net/TestDummyIoSession.java

Thanks,

DR

Hmmm .... dunno. Just wasted a lot of time trying to debug through this, and I really have no idea. I wound up just having the unit test manually issue a session.getCloseFuture().setClosed(); in order to trigger the close listener notification.

BTW, there also appears to be a bug when calling DummySession.close(false):

Feb 12, 2009 3:39:20 PM org.apache.mina.core.service.IoHandlerAdapter exceptionCaught WARNING: EXCEPTION, please implement Handler.exceptionCaught() for proper handling:
java.lang.NullPointerException
        at 
org.apache.mina.core.session.DummySession$6.flush(DummySession.java:138)
        at 
org.apache.mina.core.session.DummySession$6.flush(DummySession.java:131)
at org.apache.mina.core.session.AbstractIoSession.closeOnFlush(AbstractIoSession.java:246) at org.apache.mina.core.session.AbstractIoSession.close(AbstractIoSession.java:224)
        at Handler.messageReceived(TestDummyIoSession.java:32)
at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:722) at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434) at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:48) at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:802) at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:120) at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434) at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
        at 
TestDummyIoSession.testSessionCloseListener(TestDummyIoSession.java:17)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at junit.framework.TestCase.runTest(TestCase.java:164)
        at junit.framework.TestCase.runBare(TestCase.java:130)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:230)
        at junit.framework.TestSuite.run(TestSuite.java:225)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

DR

Reply via email to