Camel
  1. Camel
  2. CAMEL-4938

ManagedBrowsableEndpoint are broken

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.9.0
    • Fix Version/s: 2.9.1, 2.10.0
    • Component/s: camel-core, jmx
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      ManagedeBrowsableEndpoint are broken which means any component that inherit ManagedBrowsableEndpoint have errors as well. Please see the link below which will have error screen shot of queueSize JMX operations.

      http://camel.465427.n5.nabble.com/JMX-queue-size-operation-fails-Camel-2-9-0-td5233089.html

        Activity

        Vid Cheruvu created issue -
        Claus Ibsen made changes -
        Field Original Value New Value
        Fix Version/s 2.9.1 [ 12319191 ]
        Fix Version/s 2.10.0 [ 12317612 ]
        Fix Version/s 2.8.4 [ 12319072 ]
        Affects Version/s 2.9.0 [ 12316374 ]
        Component/s camel-core [ 12313938 ]
        Component/s jmx [ 12313922 ]
        Component/s camel-cometd [ 12314324 ]
        Hide
        Babak Vahdat added a comment -

        A dirty fix would be to duplicate the JMX operations already provided by ManagedBrowsableEndpoint on the SedaEndpoint as well. This seems to be also the case for JmsQueueEndpoint!

        Show
        Babak Vahdat added a comment - A dirty fix would be to duplicate the JMX operations already provided by ManagedBrowsableEndpoint on the SedaEndpoint as well. This seems to be also the case for JmsQueueEndpoint!
        Babak Vahdat made changes -
        Assignee Babak Vahdat [ bvahdat ]
        Hide
        Claus Ibsen added a comment -

        Thanks for reporting.

        We should add a specialized ManagedSedaEndpoint to combine the browsable with the custom seda operations, in one combined interface the JMX API can handle calling.

        Also adding to the unit tests that it uses some of the JMX operations from browsable endpoint in the seda endpoint test.

        I am running a test with a fix.

        Show
        Claus Ibsen added a comment - Thanks for reporting. We should add a specialized ManagedSedaEndpoint to combine the browsable with the custom seda operations, in one combined interface the JMX API can handle calling. Also adding to the unit tests that it uses some of the JMX operations from browsable endpoint in the seda endpoint test. I am running a test with a fix.
        Claus Ibsen made changes -
        Attachment CAMEL-4938.patch [ 12512416 ]
        Claus Ibsen made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Babak Vahdat added a comment - - edited

        Claus,

        thanks beforehand for providing & applying the patch which indeed resolved the problem, however the solution is to my understanding is not generic as we've now introduced SEDA Endpoint specific logic into DefaultManagementObjectStrategy:

                } else if (endpoint instanceof SedaEndpoint) {
                    ManagedSedaEndpoint me = new ManagedSedaEndpoint((SedaEndpoint) endpoint);
                    me.init(context.getManagementStrategy());
                    return me;
        

        And have also introduced a ManagedSedaEndpoint which is again Endpoint specific, IMHO not nice!

        Another note: by enableing JMX on

        org.apache.camel.component.jms.BrowsableQueueTest
        

        I see that the JMX operations are enlisted twice, causing (almost) the same behaviour (see the attached screenshot).

        Shouldn't we remove the ManagedResource & ManagedOperation annotations on JmsQueueEndpoint as well? The same as you did for SedaEndpoint?

        Show
        Babak Vahdat added a comment - - edited Claus, thanks beforehand for providing & applying the patch which indeed resolved the problem, however the solution is to my understanding is not generic as we've now introduced SEDA Endpoint specific logic into DefaultManagementObjectStrategy: } else if (endpoint instanceof SedaEndpoint) { ManagedSedaEndpoint me = new ManagedSedaEndpoint((SedaEndpoint) endpoint); me.init(context.getManagementStrategy()); return me; And have also introduced a ManagedSedaEndpoint which is again Endpoint specific , IMHO not nice! Another note: by enableing JMX on org.apache.camel.component.jms.BrowsableQueueTest I see that the JMX operations are enlisted twice, causing (almost) the same behaviour (see the attached screenshot). Shouldn't we remove the ManagedResource & ManagedOperation annotations on JmsQueueEndpoint as well? The same as you did for SedaEndpoint?
        Babak Vahdat made changes -
        Hide
        Claus Ibsen added a comment -

        Ah that single method is actually @deprecated and wasn't included on trunk.

        There is no duplicate methods, just methods with the same name, but with different parameters (eg overloaded methods).

        Show
        Claus Ibsen added a comment - Ah that single method is actually @deprecated and wasn't included on trunk. There is no duplicate methods, just methods with the same name, but with different parameters (eg overloaded methods).
        Hide
        Claus Ibsen added a comment -

        Yeah its a better idea to do like JMS endpoint. So I will fix that. Thanks.

        Show
        Claus Ibsen added a comment - Yeah its a better idea to do like JMS endpoint. So I will fix that. Thanks.
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        5d 16h 29m 1 Claus Ibsen 30/Jan/12 14:36

          People

          • Assignee:
            Babak Vahdat
            Reporter:
            Vid Cheruvu
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development