I am a newbie to MINA and ran into this issue while coding a test case for my app:
I am doing a write on a session and then doing a join() without timeout on the resulting WriteFuture. An exception is thrown in the filterWrite method of an I/O filter (in my test case I am actually using ProtocolCodecFilter and the exception is thrown from my encoder). The test case results in the join never returning, which hangs the containing thread. My expectation would be that the framework would set the WriteFuture to return false for isWritten() since the attempt to write failed. I also implemented an exceptionCaught() handler in the filter and had it close the session on the theory that the close() might clean up any pending WriteFuture instances associated with the session, but that did not change the behavior of the join. The attached code (based on the netcat example) illustrates the behavior. Marc http://www.nabble.com/file/p11846476/WhenWriteFails.java WhenWriteFails.java -- View this message in context: http://www.nabble.com/WriteFuture.join%28%29-hangs-when-exception-thrown-in-filterWrite-tf4163555s16868.html#a11846476 Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
