[
https://issues.apache.org/jira/browse/WICKET-196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462561
]
David Hosier commented on WICKET-196:
-------------------------------------
I could be wrong, but I'm guessing that if Martin isn't getting any
MBeanServers from the findMBeanServer(null) call, then getPlatformMBeanServer()
won't return anything either and the code will throw an NPE at some point. I
should also note that I went with specifying the class instead of using the
Agent ID in the findMBeanServer() call because an MBeanServer's Agent ID is
usually random or uses the creation time in milliseconds in some way. This is
because the ID must be unique in the VM, and this makes it basically impossible
to specify this deterministically. Specifying the class name of the
MBeanServer Impl was the only surefire way I could think of to specify what you
want.
> Ability to specify the MBean Server in which to register the Wicket MBeans
> --------------------------------------------------------------------------
>
> Key: WICKET-196
> URL: https://issues.apache.org/jira/browse/WICKET-196
> Project: Wicket
> Issue Type: Improvement
> Components: wicket-jmx
> Affects Versions: 1.2.3, 1.2.4
> Reporter: David Hosier
> Assigned To: Eelco Hillenius
> Fix For: 1.3, 2.0
>
> Attachments: Initializer_patch, patch.txt
>
>
> Following is a conversation between Igor and I:
> <dmhosier> You may be able to utilize this call instead:
> <dmhosier>
> http://java.sun.com/j2ee/1.4/docs/api/javax/management/MBeanServerFactory.html#findMBeanServer(java.lang.String)
> <dmhosier> but there would have to be some way to specify the agent ID
> <ivaynberg> hmm
> <ivaynberg> a system prop?
> <dmhosier> probably the best bet
> <dmhosier> maybe check if a specified property exists, and use this method to
> get the server, otherwise default to what you have now
> <ivaynberg> yeah
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira