[ 
https://issues.apache.org/jira/browse/WICKET-196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462354
 ] 

David Hosier commented on WICKET-196:
-------------------------------------

Ok, so what I've done is add the ability for a user to specify the MBeanServer 
implementation class in a System property called wicket.mbean.server.impl.  In 
the init() method, I get the list of all MBeanServers and take the one that 
matches the class name specified in the property.  If the property does not 
exist or does not match any registered servers, the first one in the list is 
taken as a default.  I also cached a reference to the MBeanServer as a global.  
I also added some helpful comments.  I think they're helpful at least.  I 
tested against JBoss AS 4.0.3SP1, and I tried setting the property to the JVM 
MBeanServer class and also the JBoss MBeanServer class.  I also tested it with 
not setting the property at all.  Hopefully everything looks OK.

> 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
>         Attachments: Initializer_patch
>
>
> 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

        

Reply via email to