Details

    • Type: Improvement Improvement
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.0-beta-5
    • Fix Version/s: None
    • Component/s: jmx
    • Labels:
      None
    • Number of attachments :
      1

      Description

      Currently, the JMXVisitor will register mbeans no matter if they are already registered in the MBeanServer or not.

      Here's a patch that first unregisters the ObjectName if it's already registered, and then registers it. (This, as opposed to ignoring the registration only if not yet registered, probably avoids stale instances of the mbean to lie in the vm)

        Activity

        Hide
        Jörg Schaible added a comment -

        I explicitly removed the check, if an object is already registered. IMHO it is up to the developer to ensure, that each MBean is only registered one and not the visitor's task.

        Show
        Jörg Schaible added a comment - I explicitly removed the check, if an object is already registered. IMHO it is up to the developer to ensure, that each MBean is only registered one and not the visitor's task.
        Hide
        Grégory Joseph (old account) added a comment -

        In a web-app, I can't know (or I don't know how I could, rather) if the webapp is being hot-redeployed or just deployed cause tomcat is starting. Thus I can't control weither I want to visit or not. But like you said on the list, it should also de-register when stopping so maybe we'd want lifecycle on the visitor instead.

        Show
        Grégory Joseph (old account) added a comment - In a web-app, I can't know (or I don't know how I could, rather) if the webapp is being hot-redeployed or just deployed cause tomcat is starting. Thus I can't control weither I want to visit or not. But like you said on the list, it should also de-register when stopping so maybe we'd want lifecycle on the visitor instead.
        Hide
        Jörg Schaible added a comment -

        Hi Greg, as already explained on the list I will not apply this (although I really appreciate your work and our discussion). Main reason is, that your patch will hide an unwanted double registration, since an existing MBean will silently dropped. I expect this to be much harder to track down as performing proper unregister operations.

        Show
        Jörg Schaible added a comment - Hi Greg, as already explained on the list I will not apply this (although I really appreciate your work and our discussion). Main reason is, that your patch will hide an unwanted double registration, since an existing MBean will silently dropped. I expect this to be much harder to track down as performing proper unregister operations.
        Jörg Schaible made changes -
        Field Original Value New Value
        Assignee Joerg Schaible [ joehni ]
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Won't Fix [ 2 ]

          People

          • Assignee:
            Jörg Schaible
            Reporter:
            Grégory Joseph (old account)
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: