mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maf <marc.fried...@andrew.com>
Subject Re: WriteFuture.join() hangs when exception thrown in filterWrite
Date Mon, 30 Jul 2007 17:14:25 GMT

I have created the following JIRA entry for this issue:

http://issues.apache.org/jira/browse/DIRMINA-412

Marc


Trustin Lee wrote:
> 
> Hi Marc,
> 
> On 7/29/07, maf <marc.friedman@andrew.com> wrote:
>>
>> 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.
> 
> Thanks for the very detailed bug reporting.  It could be prefect if
> you created a JIRA entry:
> 
> http://issues.apache.org/jira/browse/DIRMINA
> 
> Thanks,
> Trustin
> -- 
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
> 
> 

-- 
View this message in context: http://www.nabble.com/WriteFuture.join%28%29-hangs-when-exception-thrown-in-filterWrite-tf4163555s16868.html#a11866792
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.


Mime
View raw message