[JIRA] Created: (LBGENERAL-28) JMX configurator should be able to use MBeanServers with a domain name

JMX configurator should be able to use MBeanServers with a domain name ---------------------------------------------------------------------- Key: LBGENERAL-28 URL: http://jira.qos.ch/browse/LBGENERAL-28 Project: logback-general Issue Type: New Feature Affects Versions: 0.9.16 Reporter: C Z Assignee: Logback dev list Currently, logback exposes an MBean to provide logging related controls via the inclusion of the following configuration: <jmxConfigurator /> However, this *always* uses the platform mbean server: MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); (can be found in class JMXConfiguratorAction, line# 54). I think it should be able to provide an option to use an MBeanServer with a specific domain, which is provided in the JMX spec. The code needs to use the following: List servers = MBeanServerFactory.findMBeanServer(agentId); and then use the first one, possibly giving a warning if there are multiple. This is crucial for our use-case, especially because we have separate MBeanServers in our web-app environment, and we need each application to use its own MBeanServer with a specific domain. So, all in all, can we add an attribute of some sort, so that we can do the following: <jmxConfigurator agentid="someMbeanServerId"/> and if this is set, the code uses: MBeanServer mbs = MBeanServerFactory.findMBeanServer(agentId).get(0); and otherwise, it does whatever it used to do. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBGENERAL-28?page=com.atlassian.jira.plugin.system... ] cj91 commented on LBGENERAL-28: ------------------------------- I agree that this is an important issue, especially for WebSphere users. Websphere has an MBeanServer, however, if you have global security enabled on the JVM, it is impossible* to manipulate mbeans inside that server unless you use IBM's proprietary adminclient JMX implementation. We managed to get around IBM's ridiculous lockin strategy by creating a seperate RMI registry and atttaching a new MBeanServer to that registry. Our Apps then attach to that MBeanserver rather than Websphere's default, and we set the security based on our rules, not IBM's. If logback allowed you to specify an agentid as requested above, or better yet, specify a factory method on a class, this would offer great relief for the unfortunate slaves of Websphere and really increase the flexibility of logback. Thank you, -Jon *you have to fight through many layers of IIOP, JAAS, and Java security. It really is diificullt. And don't even think about connecting a Sun JVM to an IBM JVM with global security... haha
JMX configurator should be able to use MBeanServers with a domain name ----------------------------------------------------------------------
Key: LBGENERAL-28 URL: http://jira.qos.ch/browse/LBGENERAL-28 Project: logback-general Issue Type: New Feature Affects Versions: 0.9.16 Reporter: Celal Ziftci Assignee: Logback dev list
Currently, logback exposes an MBean to provide logging related controls via the inclusion of the following configuration: <jmxConfigurator /> However, this *always* uses the platform mbean server: MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); (can be found in class JMXConfiguratorAction, line# 54). I think it should be able to provide an option to use an MBeanServer with a specific domain, which is provided in the JMX spec. The code needs to use the following: List servers = MBeanServerFactory.findMBeanServer(agentId); and then use the first one, possibly giving a warning if there are multiple. This is crucial for our use-case, especially because we have separate MBeanServers in our web-app environment, and we need each application to use its own MBeanServer with a specific domain. So, all in all, can we add an attribute of some sort, so that we can do the following: <jmxConfigurator agentid="someMbeanServerId"/> and if this is set, the code uses: MBeanServer mbs = MBeanServerFactory.findMBeanServer(agentId).get(0); and otherwise, it does whatever it used to do.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBGENERAL-28?page=com.atlassian.jira.plugin.system... ] cj91 updated LBGENERAL-28: -------------------------- Attachment: JMXConfiguratorAction.java sorry I can't submit a 'patch'... I don't have a GIT client and cannot install one. However, the change to specify an agent ID is quite simple, so I pulled the file from the maven source jar and made the necessary changes (less than 10 LOC). Suggestions for further improvement would be to specify: factoryClass="com.yourcompany.jmx.MBServerlocator" factoryMethod="locateMBeanServer" which would reflect on the specified class and invoke the method to return the server. Enjoy!
JMX configurator should be able to use MBeanServers with a domain name ----------------------------------------------------------------------
Key: LBGENERAL-28 URL: http://jira.qos.ch/browse/LBGENERAL-28 Project: logback-general Issue Type: New Feature Affects Versions: 0.9.16 Reporter: Celal Ziftci Assignee: Ceki Gulcu Attachments: JMXConfiguratorAction.java
Currently, logback exposes an MBean to provide logging related controls via the inclusion of the following configuration: <jmxConfigurator /> However, this *always* uses the platform mbean server: MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); (can be found in class JMXConfiguratorAction, line# 54). I think it should be able to provide an option to use an MBeanServer with a specific domain, which is provided in the JMX spec. The code needs to use the following: List servers = MBeanServerFactory.findMBeanServer(agentId); and then use the first one, possibly giving a warning if there are multiple. This is crucial for our use-case, especially because we have separate MBeanServers in our web-app environment, and we need each application to use its own MBeanServer with a specific domain. So, all in all, can we add an attribute of some sort, so that we can do the following: <jmxConfigurator agentid="someMbeanServerId"/> and if this is set, the code uses: MBeanServer mbs = MBeanServerFactory.findMBeanServer(agentId).get(0); and otherwise, it does whatever it used to do.
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
participants (2)
-
C Z (JIRA)
-
cj91 (JIRA)