dev@grizzly.java.net

Re: A question about outbound connection cache

From: Oleksiy Stashok <Oleksiy.Stashok_at_Sun.COM>
Date: Fri, 27 Feb 2009 10:57:11 +0100

Hi Minoru,

>>>>>
>>>>>
>>>>> I tested with grizzly-framework-1.9.6-20090223.215705-46.jar and
>>>>> grizzly-utils-1.9.6-20090223.215705-47.jar. It worked !! Thank
>>>>> you.
>>>>>
>>>>> CacheableConnectorHandler implementation is different from 1.9.5.
>>>>> I have not examined the code, but I guessed that's the reason.
>>>> Yes, you're right. I've changed it a bit to avoid problems with
>>>> Map,
>>>> which you mentioned.
>>>>
>>>> Thanks.
>>>
>>>
>>> Then, this time, I have a question about
>>> OutboundConnectionCacheBlockingImpl.close method.
>>>
>>> :
>>> :
>>> try {
>>> conn.close() ;
>>> } catch (IOException exc) {
>>> if (debug())
>>> dprint( ".close: " + conn + ": Caught IOException on
>>> close:"
>>> + exc ) ;
>>> }
>>>
>>> /* FIX --> */
>>> if (cs.entry.totalConnections() == 0){
>>> ContactInfo cinfo = cs.cinfo;
>>> entryMap.remove(cinfo);
>>> }
>>>
>>> Above code is needed?
>> Well, I'm not original author of OutboundConnection cache, so can not
>> be sure... Do you see any problem with that part?
>
> Sorry for asking you about this code, but I have a problem.
>
> I modified OutboundConnectionCacheBlockingImpl to monitor sizes of
> each
> HashMaps in it.
>
> I found out that entries in connectionMap are removed in close method,
> but entries of entryMap are never removed. I think there is
> potentially memory
> leak problem in OutboundConnectionCacheBlockingImpl.
Ok, now I got your point, so you propose patch for
OutboundConnectionCacheBlockingImpl, right? :)
Completely agree with you. Can I ask you to file issue with your
suggestion?

Thank you very much!

WBR,
Alexey.


>
>
> Minoru
>
>> Thanks.
>>
>> WBR,
>> Alexey.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net
>