You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Hiram Chirino (JIRA)" <ji...@apache.org> on 2008/07/25 18:55:32 UTC

[jira] Created: (ZOOKEEPER-99) All MXBeans interfaces that don't use complex paramters need to be renamed as MBean interaces.

All MXBeans interfaces that don't use complex paramters need to be renamed as MBean interaces. 
-----------------------------------------------------------------------------------------------

                 Key: ZOOKEEPER-99
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-99
             Project: Zookeeper
          Issue Type: Bug
          Components: server
            Reporter: Hiram Chirino
             Fix For: 3.0.0


All the MXBean interfaces that I've looked at are standard MBean interfaces.  The interface names should get renamed to MBean instaead of MXBean. That way the server can also run on a the Java 1.5 Platform.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-99) All MXBeans interfaces that don't use complex paramters need to be renamed as MBean interaces.

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-99?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Hunt updated ZOOKEEPER-99:
----------------------------------

      Component/s:     (was: server)
                   jmx
    Fix Version/s:     (was: 3.0.0)

> All MXBeans interfaces that don't use complex paramters need to be renamed as MBean interaces. 
> -----------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-99
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-99
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: jmx
>            Reporter: Hiram Chirino
>
> All the MXBean interfaces that I've looked at are standard MBean interfaces.  The interface names should get renamed to MBean instaead of MXBean. That way the server can also run on a the Java 1.5 Platform.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-99) All MXBeans interfaces that don't use complex paramters need to be renamed as MBean interaces.

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-99?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12677437#action_12677437 ] 

Patrick Hunt commented on ZOOKEEPER-99:
---------------------------------------

Hi Eric, I'm not an expert on jmx, but I believe the original contributors of this code used mxbeans for a reason. In particular:

See this blog post by one of the authors of mxbeans:
http://weblogs.java.net/blog/emcmanus/archive/2006/02/what_is_an_mxbe.html
"Going forward, it will generally be a good idea to write an MXBean wherever you would write a Standard MBean today."

http://java.sun.com/javase/6/docs/api/javax/management/MXBean.html
"The MXBean concept provides a simple way to code an MBean that only references a predefined set of types, the ones defined by javax.management.openmbean. In this way, you can be sure that your MBean will be usable by any client, including remote clients, without any requirement that the client have access to model-specific classes representing the types of your MBeans."

http://marxsoftware.blogspot.com/2008/06/jmx-mxbean.html
"MXBeans in Java SE 6: Bundling Values without Special JMX Client Configurations recommends using MXBeans in any Java SE 6 application where Standard MBeans may have been used before moving to Java SE 6."
This blog post also shows that in some cases JMX UIs render the bean fields better with mxbeans than with std mbeans

Can you explain a bit about why ZooKeeper cannot be embedded into JBoss currently? Doesn't JBoss support MXBeans? This was standardized in java6, no? (that mxbeans are included in 1.6).

>From what I read it seems like moving from mx -> standard mbeans is a step back. But I'd like to understand the problems seen with JBoss. If you can include some code/config that I could easily deploy into JBoss I'd be happy to try it out myself - perhaps we could include this in our testing regime so that we maintain compatibility going forward.

ps. we dropped java5 support in 3.1, we now only support java6, so the original description of the jira is stale. See ZOOKEEPER-210



> All MXBeans interfaces that don't use complex paramters need to be renamed as MBean interaces. 
> -----------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-99
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-99
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: jmx
>            Reporter: Hiram Chirino
>         Attachments: ZOOKEEPER-99.patch
>
>
> All the MXBean interfaces that I've looked at are standard MBean interfaces.  The interface names should get renamed to MBean instaead of MXBean. That way the server can also run on a the Java 1.5 Platform.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-99) All MXBeans interfaces that don't use complex paramters need to be renamed as MBean interaces.

Posted by "Patrick Hunt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-99?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12677452#action_12677452 ] 

Patrick Hunt commented on ZOOKEEPER-99:
---------------------------------------

I'd still like to try this out regardless of priority. Can you attach the basic configuration (ear file?) that I would need to try this out? I'd do it myself but I'm not familiar with JBoss and it would take some time to reproduce what you've already done.

> All MXBeans interfaces that don't use complex paramters need to be renamed as MBean interaces. 
> -----------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-99
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-99
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: jmx
>            Reporter: Hiram Chirino
>         Attachments: ZOOKEEPER-99.patch
>
>
> All the MXBean interfaces that I've looked at are standard MBean interfaces.  The interface names should get renamed to MBean instaead of MXBean. That way the server can also run on a the Java 1.5 Platform.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-99) All MXBeans interfaces that don't use complex paramters need to be renamed as MBean interaces.

Posted by "Eric Bowman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-99?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Bowman updated ZOOKEEPER-99:
---------------------------------

    Attachment: ZOOKEEPER-99.patch

Here's a patch against r748487.

This problem is quite an obstacle to embedding Zookeeper in JBoss, so it would be great if you could roll it into 3.2.

The JMX convention (as implemented by JBoss, anyhow) requires that the MBean interfaces be named XXXMBean, and the implementing classes XXX.

So I have renamed, for example, ZooKeeperServerMXBean to ZooKeeperServerBeanMBean, so that ZooKeeperServerBean can remain.

I also made all the MBean interfaces extend ZKInfoMBean (formerly ZKMBeanInfo), instead of having each implementation implement it as well.  I suppose that might controversial, but I couldn't see a good reason to have ZKInfoMBean references scattered around the implementation.

Hope this is useful -- it's necessary for us to use ZooKeeper, so we will be working off a patched version of the trunk until this or something equivalent makes its way into a release.

> All MXBeans interfaces that don't use complex paramters need to be renamed as MBean interaces. 
> -----------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-99
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-99
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: jmx
>            Reporter: Hiram Chirino
>         Attachments: ZOOKEEPER-99.patch
>
>
> All the MXBean interfaces that I've looked at are standard MBean interfaces.  The interface names should get renamed to MBean instaead of MXBean. That way the server can also run on a the Java 1.5 Platform.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-99) All MXBeans interfaces that don't use complex paramters need to be renamed as MBean interaces.

Posted by "Eric Bowman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-99?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12677444#action_12677444 ] 

Eric Bowman commented on ZOOKEEPER-99:
--------------------------------------

I'm certainly no expert on JMX; these are just changes that were necessary to make this work with JBoss 4.2.2.GA, which has code which explicitly looks for an interface on a class XXX named XXXMBean, at least for static MBeans.

It does seem that embedding Zookeeper isn't much of a priority, so maybe it's not worth the effort; I do find it pretty handy to do so, though, and the MXBean approach doesn't work for me.

> All MXBeans interfaces that don't use complex paramters need to be renamed as MBean interaces. 
> -----------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-99
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-99
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: jmx
>            Reporter: Hiram Chirino
>         Attachments: ZOOKEEPER-99.patch
>
>
> All the MXBean interfaces that I've looked at are standard MBean interfaces.  The interface names should get renamed to MBean instaead of MXBean. That way the server can also run on a the Java 1.5 Platform.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-99) All MXBeans interfaces that don't use complex paramters need to be renamed as MBean interaces.

Posted by "Hiram Chirino (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-99?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12781376#action_12781376 ] 

Hiram Chirino commented on ZOOKEEPER-99:
----------------------------------------

Hi Patrick, if it runs fine on java 1.5, then it should run fine in JBoss.

> All MXBeans interfaces that don't use complex paramters need to be renamed as MBean interaces. 
> -----------------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-99
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-99
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: jmx
>            Reporter: Hiram Chirino
>         Attachments: ZOOKEEPER-99.patch
>
>
> All the MXBean interfaces that I've looked at are standard MBean interfaces.  The interface names should get renamed to MBean instaead of MXBean. That way the server can also run on a the Java 1.5 Platform.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.