Ted Yu a écrit :
Hi,
According to http://mina.apache.org/faq.html:
We recommend to switch the default buffer type to 'heap' by inserting the
following code before you start a server:
ByteBuffer.setUseDirectBuffers(false);
Should the above call should be inserted before calling
NioSocketAcceptor.bind() ?
If not, which call should I insert the above code before ?
I suppose you are using MINA 1.x (please, *please*, PLEASE, _always_
mention the vesion you are using when posting a question !!!)
You can tell MINA to use heap buffers before doing anything, as it's a
static flag. So do it in the very first line of your program.
In MINA 2.0, there is no need to care about this : the ByteBuffer
allocator uses Heap buffer as a default (MINA 1.x was totally wrong to
use DirectBuffer by default) .