dev@grizzly.java.net

Re: A question about outbound connection cache

From: Oleksiy Stashok <Oleksiy.Stashok_at_Sun.COM>
Date: Mon, 23 Feb 2009 10:12:43 +0100

Hi Minoru,

just wanted to check, if last time you tested your app with the latest
Grizzly 1.9.6+?

Thanks.

WBR,
Alexey.

On Feb 23, 2009, at 1:49 , Minoru Nitta wrote:

> Hi Alexy,
>
>
> Thank you for deep consideration. I did not kow what you pointed
> out, so
> I modified my test program, as attached. To be sure, I checked my
> program
> by myself again, and synchronized execute method of my filter
> (TestFilter).
>
> The result is the attached result.txt. Coud I ask you please to
> double-check the program again?
>
>
> Minoru
>
>
>> Hi Monoru,
>>
>> you were right, there was really issue with returning
>> CacheableConnectorHandler back to pool. Because at the same time
>> connection may be used by OutboundConnectionCache.
>> But there is also problem in your test - you can not start send UDP
>> packets in loop, before making sure, that Controller has started.
>> For example like this:
>>
>> final CountDownLatch latch = new CountDownLatch(1);
>> controller.addStateListener(new
>> ControllerStateListenerAdapter() {
>> @Override
>> public void onReady() {
>> latch.countDown();
>> }
>>
>> @Override
>> public void onException(Throwable e) {
>> if (latch.getCount() > 0) {
>> Controller.logger().log(Level.SEVERE, "Exception
>> during " +
>> "starting the controller", e);
>> latch.countDown();
>> } else {
>> Controller.logger().log(Level.SEVERE, "Exception
>> during " +
>> "controller processing", e);
>> }
>> }
>> });
>>
>> new Thread(controller).start();
>>
>> try {
>> latch.await();
>> } catch (InterruptedException ex) {
>> }
>>
>> WBR,
>> Alexey.
>>
> <
> GrizzlyCacheTest
> .java
> >
> <
> result
> .txt
> >---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: dev-help_at_grizzly.dev.java.net