directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Andersson <ja...@minq.se>
Subject [Mina] IllegalStateException: Already released buffer
Date Tue, 29 Mar 2005 13:55:52 GMT
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

 

Mime
View raw message