[ http://issues.apache.org/jira/browse/DIRMINA-210?page=comments#action_12377809 ]
peter royal commented on DIRMINA-210: ------------------------------------- I think Niklas's approach has merit.. If we were to do this, ideally, we would get rid of the static methods. Thus, I don't think the ThreadLocal idea would be the best idea. The IoServiceConfig is the most logical place to put this.. And we can always have SimpleByteBuffer.allocate(), to create non-pooled buffers from user code. Heck, ByteBuffer.allocate() can even be retained, and it just returns a non-pooled heap buffer. As long as the core was changed to use the explicit allocator, users would be free to migrate their code at their own pace w/o breakage. > Investigate removal of static methods in ByteBuffer > --------------------------------------------------- > > Key: DIRMINA-210 > URL: http://issues.apache.org/jira/browse/DIRMINA-210 > Project: Directory MINA > Type: Improvement > Reporter: peter royal > Assignee: peter royal > > The removal of the static methods in ByteBuffer should be investigated. > Since the ByteBufferAllocator exists, that interface could be used directly. > For backwards compatibility ( and simple cases ), the static methods could be > retained and use a supplied instance. > Potentially, the MINA internals could all access buffers via the allocator, > leaving only user-code to use the optional static methods (after statically > supplying the allocator). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
