dev@grizzly.java.net

Re: A question about outbound connection cache

From: Oleksiy Stashok <Oleksiy.Stashok_at_Sun.COM>
Date: Thu, 19 Feb 2009 13:49:05 +0100

Hi Minoru,

please try this fix in your code to check if it works:

             try {
                 connectorHandler.write(buffer, false);
             } catch (Exception e) {
             } finally {
/*FIX ---> */ connectorHandler.close();
             }


Thanks.

WBR,
Alexey.


On Feb 19, 2009, at 5:38 , Minoru Nitta wrote:

> Hello,
>
>
> Could you please check the attached source code ?
> (It may be disgraceful, or not be easy to understand...) I tested the
> code with Grizzly 1.9.5.
>
> The result is the attached 'result.txt' file. I ran it on RHEL4 and
> checked
> the socket status by using netstat command. I specified highest
> watermark
> is 2 and maxParallel to the same destination as 1.
>
> The result shows that there are two connections to each same address
> (2 connections to 5063 port and 2 connections to 5064 port), and there
> are 4 connections even though I specified highest watermark as 2.
>
> I suspected inappropriate use of HashMap in
> OutboundConnectionCacheBlockingImpl,
> but I appreciate very much if you can point out my misunderstandings.
>
>
> Thank you.
>
> Minoru
> <
> result
> .txt
> >
> <
> GrizzlyCacheTest
> .java
> >---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net