Hello All, I have a Mina-using application that sends data as a number of messages to a device that acknowledges receipt of each message. When the last message has been sent, the device recognises yhat it is the last message and then the session is closed.
The problem I have is that the session is closed after my application has sent only the first message and the device never receives it. The sending application, which extends IoHandlerAdapter, calls 'messageSent' and then 'messageSent' in IoFilterAdapter is subsequently called... and so on... Without showing the entire debugging scenario there is a 'WriteRequestQueue' in 'DefaultIoFilterChain' that when it empties then the session is closed. It seems the queue is emptied after my application has only sent one message even if there are still other messages being sent. 'WriteRequest's are passed on by the 'fireMessageSent' method in 'DefaultIoFilterChain' which has two inner classes, 'HeadFiler' and 'TailFilter,' that process the 'WriteRequestQueue' If the 'WriteRequestQueue' is empty (and herein the problem lies...) then the session calls a "polling I/O processor" which attempts to write the message, but this throws an I/O exception and then the session closes. I have other Mina applications and this has never happened before... Does any of this make any sense? Any ideas? I wondered if it was some sort of timing issue, if the messages are not being sent fast enough and the 'WriteRequestQueue' empties before the next message arrives. Thanks for reading this far! Regards, Garry Archer Systems Programmer Department of Pathology Yale School of Medicine
