You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Veer <kr...@gmail.com> on 2007/02/02 05:56:48 UTC

Session Close Problem

Hi Folks,

I am new to mina;

 was playing with HTTP server example with streams. I modified it  a bit.
When I write to output stream (I have already written to stream); the
session get closed.

now the dumb question:
How can I keep this session gracefully open and keep writing in the output
stream?

java.io.IOException: The session has been closed
at org.apache.mina.handler.support.IoSessionOutputStream.checkClosed(
IoSessionOutputStream.java:56)


thanks
veer
-- 
Imagination is more important than knowledge...Albert Einstein

Re: Session Close Problem

Posted by Stefan Bischof <st...@gmail.com>.
Veer schrieb:
> Hi Folks,
>
> I am new to mina;
Mee too :-)
> was playing with HTTP server example with streams. I modified it  a bit.
> When I write to output stream (I have already written to stream); the
> session get closed.
>
> now the dumb question:
> How can I keep this session gracefully open and keep writing in the 
> output
> stream?
>
> java.io.IOException: The session has been closed
> at org.apache.mina.handler.support.IoSessionOutputStream.checkClosed(
> IoSessionOutputStream.java:56) 
I tried this in the HTTP example, and it didn't close the connection if 
i just commented everything in the finally-block out (except out.flush()).

Probably i didn't understood your problem?

regards
Stefan Bischof