dev@glassfish.java.net

Re: Activating my monitoring module

From: Jennifer Chou <jennifer.chou_at_oracle.com>
Date: Fri, 07 Jan 2011 19:34:14 -0500

On 1/7/2011 7:05 PM, Lee Chuk Munn wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Thanks. What is the practice for other modules? Do they have a asadmin
> subcommand to load it or its always loaded?
>
I think the module should get loaded when needed, whether on startup or
upon deployment, etc.
> If the module is not loaded and when I fire the event, the event will
> not get published right? Are there any performance implications?
>
Correct, when you fire the event you're calling the no-op probe method -
the probe itself will not get fired.
No additonal performance implication if you have the values already to
pass to the no-op probe method.
> Thanks again for the quick reply
>
> Regards
> Chuk
>
> On 07/01/11 23:36, Tom Mueller wrote:
>
>> To have the service loaded, something else that is loaded needs to
>> reference it, or it needs to implement the org.glassfish.api.Startup
>> interface, or you can put the module into the modules/autostart directory.
>>
>> Tom
>>
>>
>> On 1/7/2011 8:56 AM, Lee Chuk Munn wrote:
>>
>>> Hi
>>>
>>> I've written some probes and the ModuleBootstrap like so
>>>
>>> @Service(name="xmppcontainer-jmx")
>>> @Scoped(Singleton.class)
>>> public class XMPPContainerJMXimplements PostConstruct {
>>>
>>> public void postConstruct() {
>>> StatsProviderManager.register(...)
>>> }
>>>
>>> 1. How does this get loaded?
>>>
>>> 2. Do you only publish events when the listeners are loaded?
>>>
>>> Thanks
>>>
>
> - --
> We are on the verge: Today our program proved Fermat's next-to-last theorem.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQEcBAEBAgAGBQJNJ6pJAAoJEAnxPH9ZReNj7IYH/RCACphFZHRORCmnwze7xiw+
> YH7gCOsX2Sm988tpsm1s8+NIhKp7lwpc6sqA+9gpRQ/o0AyAKJxgjT6q6q7gg8IH
> YirN299Poe7mXxTwobi6/cskq7Dy2rNNunsRjyU8v795FBAFDwxbKAd7w7qQztsY
> 1Gh46axGkAQDu9W8g6LGoAOp9jDQjTcMTUJWDMkAxySRAbXhBxBKyGf/adDefsD4
> DvhDQMAeYwyAv9Gj7B1aNvRpU90NB3YX9TwoaprnS/i+WIKoxNZobMNaB3HhINDW
> X7I6eWiKRXIXFxFaW9VvJ97FygQNfaVE5+fSRSQ9bKQ4cMZGb3kogu+wfdE6/5o=
> =xsD/
> -----END PGP SIGNATURE-----
>