[ http://issues.apache.org/jira/browse/DIRMINA-176?page=comments#action_12367853 ]
Federico Bonelli commented on DIRMINA-176: ------------------------------------------ This jakarta api seems to be the right solution, we can do a GenericObjectPool for each buffer size, at the same way we mantain multiple stacks now. This api provides the timeout we thought, it provides also the method that block if the objects are not available (in case we are over the maximum size of the pool, and we cannot allocate other buffers). We have to define better some things, but it looks great to me. One thing is the following: in this jakarta pool the new objects are provided by a factory that allocate all the objects equals. So for each partition we will be obliged to allocate only one kind of buffer, the higher size buffer of the partition, right? I'm not so good with english, so I hope I have well explained my doubt. > ByteBuffer pool manager which prevents endlessly increasing pool size. > ---------------------------------------------------------------------- > > Key: DIRMINA-176 > URL: http://issues.apache.org/jira/browse/DIRMINA-176 > Project: Directory MINA > Type: New Feature > Reporter: Trustin Lee > Fix For: 0.9.3 > > The current implementation of ByteBuffer pool is designed to increase its > size for ever; it doesn't decrease at all. This is often a cause of > OutOfMemoryError and unexpedly huge heap size. There's one viable solution > for this issue: > * Remove the buffers which have been unused for a long time from the pool. -- 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
