[ 
http://issues.apache.org/jira/browse/DIRMINA-210?page=comments#action_12377756 
] 

Niklas Therning commented on DIRMINA-210:
-----------------------------------------

Trustin, could you please explain further how one could accomplish supporting 
multiple allocators in the same running MINA app and still use the static 
methods? Using different classloaders? Using ThreadLocals will be hard I think 
because of the asynchronous nature of MINA. 

What I proposed was a simple way of at least making the MINA internals use the 
allocator set by the user in the IoServiceConfig. It would then be up to the 
user to use the static methods and thus use the globally set allocator in his 
own code, or use the allocator which can be retrieved from the current session.


> 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

Reply via email to