Hi Trustin, I am not closing the session at all; Attached is the src code. I modified the TestSerialization example http://issues.apache.org/jira/browse/DIRMINA-51 ; Could not think about a Junit for the client server environment. I have increased the size of the byte array. On my system the byte array size of 1000 was a no go. If you run the Server and client you would notice the message with 1000 byte does not reach the server. Thank you for your quick responses and help. Let me know if this is insufficient. Regards, Amit On Nov 14, 2005, at 8:20 PM, Trustin Lee wrote: > 2005/11/15, Trustin Lee : > Hi Amit, > It should work fine even with 1MB ByteBuffer. It would be great if > you can attach a JUnit > TestCase to reproduce this issue. > > And please don't forget to make sure that you didn't close the > session before the message is actually written out completely. You > can use WriteFuture: > > WriteFuture future = session.write(bigBuffer); > future.join(); > assert future.isWritten(); // It will return true if written > successfully. > > HTH. > Trustin > -- > what we call human nature is actually human habit > -- > http://gleamynode.net/