You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Jan Andersson <ja...@minq.se> on 2005/03/29 15:55:52 UTC
[Mina] IllegalStateException: Already released buffer
We get exceptions with the latest version of Mina in our application:
Exception in thread "SocketIoProcessor"
java.lang.IllegalStateException: Already released buffer.
at
org.apache.mina.common.ByteBuffer.acquire(ByteBuffer.java:148)
at
org.apache.mina.io.socket.SocketIoProcessor.read(SocketIoProcessor.java:
240)
at
org.apache.mina.io.socket.SocketIoProcessor.processSessions(SocketIoProc
essor.java:221)
at
org.apache.mina.io.socket.SocketIoProcessor.access$200(SocketIoProcessor
.java:41)
at
org.apache.mina.io.socket.SocketIoProcessor$Worker.run(SocketIoProcessor
.java:496)
I suspect that this is caused by me trying to set the receive buffer
size
from new default size of 1K to 8K.
What I do is that I call
SocketSessionConfig.setSessionReceiveBufferSize(8192)
from my IoHandler.sessionOpened() method like this:
public void sessionOpened(IoSession ioSession)
{
SocketSessionConfig ssc = (SocketSessionConfig)
session.getConfig();
ssc.setSessionReceiveBufferSize(8192);
...
}
Obviously this isn't the right way to change the receive buffer size,
but where/how
would be the correct way to set this?
/Janne
Re: [Mina] IllegalStateException: Already released buffer
Posted by Jan Andersson <ja...@minq.se>.
> Oops, it was a bug. I checked in the fix.
Thanks!
12 minutes from reporting the problem to a checked in fix.
That's not to bad ;)
/Janne
Re: [Mina] IllegalStateException: Already released buffer
Posted by Trustin Lee <tr...@gmail.com>.
Hi Janne,
On Tue, 29 Mar 2005 15:55:52 +0200, Jan Andersson <ja...@minq.se> wrote:
> We get exceptions with the latest version of Mina in our application:
>
> Exception in thread "SocketIoProcessor"
> java.lang.IllegalStateException: Already released buffer.
> at
> org.apache.mina.common.ByteBuffer.acquire(ByteBuffer.java:148)
> at
> org.apache.mina.io.socket.SocketIoProcessor.read(SocketIoProcessor.java:
> 240)
> at
> org.apache.mina.io.socket.SocketIoProcessor.processSessions(SocketIoProc
> essor.java:221)
> at
> org.apache.mina.io.socket.SocketIoProcessor.access$200(SocketIoProcessor
> .java:41)
> at
> org.apache.mina.io.socket.SocketIoProcessor$Worker.run(SocketIoProcessor
> .java:496)
>
> I suspect that this is caused by me trying to set the receive buffer
> size
> from new default size of 1K to 8K.
>
> What I do is that I call
> SocketSessionConfig.setSessionReceiveBufferSize(8192)
> from my IoHandler.sessionOpened() method like this:
>
> public void sessionOpened(IoSession ioSession)
> {
> SocketSessionConfig ssc = (SocketSessionConfig)
> session.getConfig();
> ssc.setSessionReceiveBufferSize(8192);
> ...
> }
>
> Obviously this isn't the right way to change the receive buffer size,
> but where/how
> would be the correct way to set this?
Oops, it was a bug. I checked in the fix. Sorry for the inconvenience!
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/