On 11/7/06, Hieu Phan Thanh <[EMAIL PROTECTED]> wrote:
Hi Trustin, > Yes, it's correct. Once the messageSent event is fired, it is forwarded > to > IoHandler even if the connection is being closed at the moment. It is > because all events are stored in a queue. > I think the messageSent event is not related to what I meant. I mentioned about the *decode* and *messageReceived* methods.
Once any kind of event is fired, it is forwarded to IoHandler even if the connection is being closed at the moment. It is because all fired events are stored in a queue. But you shouldn't stop thread pools. I want to withdraw my assumption because based on my test-results, it
was not correct. I have added an counter (static variable) and this variable will be increased 1 when the *decode()* is invoked and it will be decreased 1 when the *messageReceived()* is invoked. My expected result is when the system is stopped successful, this counter's value must be zero (0). But it was not. Could we treat this problem is a bug of MINA framework? Did you remember there was a time I asked about this kind of questions? And I already had my own solution: the main thread will wait until the counter is zero before stopped successfully. But I think that mina has to finish all message by itself. How do you think?
Could you make sure if your thread pool is not shut down yet? Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP key fingerprints: * E167 E6AF E73A CBCE EE41 4A29 544D DE48 FE95 4E7E * B693 628E 6047 4F8F CFA4 455E 1C62 A7DC 0255 ECA6
