users@grizzly.java.net

Re: JMX Management unregister of a bean

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Mon, 08 Sep 2008 13:27:48 -0400

Salut,

Mark Hig wrote:
>
>
> Jeanfrancois Arcand-2 wrote:
>> Salut,
>>
>> Mark Hig wrote:
>>> Hi
>>>
>>> We are using Grizzly to process requests asynchronously. We have written
>>> a
>>> JMX Bean Manager so that Grizzly can register requests with JMX. The
>>> register method on the management interface is correctly called and we
>>> can
>>> see the JMX stats for the RequestInfo bean in JConsole correctly.
>>>
>>> The problem we have, however, is that Grizzly never seems to call the
>>> unregister method on the Bean Management interface. this means that the
>>> references to the requests are never released by the Bean Manager and our
>>> server quickly runs out of resources.
>> Hum not good. Can you cut& paste the way you invoke the unregister? From
>> that I will write a test case to see if I can reproduce the issue locally.
>>
>> Thanks!
>>
>> -- Jeanfrancois
>>
>>
>>
>>> T.I.A
>>>
>>> Mark
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>
>>
>>
>
>
> Am I missing something here. I was expecting Grizzly to call the
> unregisterComponent on the Management interface, which would remove the bean
> from the Bean manager. The registerComponent is being called automatically
> by Grizzly. There seems to be no way to get a reference to the RequestInfo
> object so that we can call unregisterComponent manually.

This is a bug. I'm looking at it now.


>
> I am not sure what you mean by "invoke the unregister". What class is this
> method on? If you mean unregisterComponent, how do we get the RequestInfo
> object. I was assuming that Grizzly would do this for me automatically, as
> per the registerComponent method.

Sorry I wasn't clear. Doing Management.unregisterComponent must destroy
automatically all the beans, specially the heavy weight RequestInfo.

Thanks

-- Jeanfrancois


>
>
> Thanks,
>
> Mark.