Camel
  1. Camel
  2. CAMEL-1450

Add custom endpoints to camel jmx mbean server

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6.0
    • Fix Version/s: 2.0-M2
    • Component/s: camel-core
    • Labels:
      None

      Description

      Currently, when adding endpoints to the mbean server, all endpoints are wrapped with ManagedEndpoint. This does not allow for custom attributes or operations to be exposed on the custom endpoints. I would like the InstrumentationLifecycleStrategy.onEndpointAdd() method to first check if the endpoint is annotated with ManagedResource, if it is then register that endpoint; if the endpoint is not annotated with ManagedResource then wrap it with ManagedEndpoint and register. This way all endpoints still get registered but any custom attributes or operations will be exposed through jmx.

      1. CAMEL-1450.v2.patch
        8 kB
        Stephen Mullins
      2. CAMEL-1450.patch
        7 kB
        Stephen Mullins

        Activity

        Hide
        Claus Ibsen added a comment -

        Closing all 2.0M2 tickets

        Show
        Claus Ibsen added a comment - Closing all 2.0M2 tickets
        Hide
        Stephen Mullins added a comment -

        W00t, thank you! Let me know if there's anything else I can help with

        Show
        Stephen Mullins added a comment - W00t, thank you! Let me know if there's anything else I can help with
        Hide
        Claus Ibsen added a comment -

        Thanks Stephen. I have committed the patch

        trunk: 760956.

        Show
        Claus Ibsen added a comment - Thanks Stephen. I have committed the patch trunk: 760956.
        Hide
        Claus Ibsen added a comment -

        TODO: Update the CXF wiki page

        Show
        Claus Ibsen added a comment - TODO: Update the CXF wiki page
        Hide
        Stephen Mullins added a comment -

        Ok I've removed the dependency on Spring in favor of using the camelContext.resolveClass() to get the annotation, then using java reflection to invoke the objectName() method on it.

        Show
        Stephen Mullins added a comment - Ok I've removed the dependency on Spring in favor of using the camelContext.resolveClass() to get the annotation, then using java reflection to invoke the objectName() method on it.
        Hide
        Claus Ibsen added a comment -

        Thanks for the update Stephen. No worry I just wanted to give a ping in case you wanted to help out with the last hurdle.

        As I am closing down issues to keep 2.0 within sight for a Q2 2009 release.

        Show
        Claus Ibsen added a comment - Thanks for the update Stephen. No worry I just wanted to give a ping in case you wanted to help out with the last hurdle. As I am closing down issues to keep 2.0 within sight for a Q2 2009 release.
        Hide
        Stephen Mullins added a comment -

        Hey sorry I haven't redone this patch yet. I'm going to knock it out today for sure. I have been busy working on a new router written in camel for Orbitz. I'll get to this today, sorry again for the delay.

        Show
        Stephen Mullins added a comment - Hey sorry I haven't redone this patch yet. I'm going to knock it out today for sure. I have been busy working on a new router written in camel for Orbitz. I'll get to this today, sorry again for the delay.
        Hide
        Claus Ibsen added a comment -

        Stephen, any update on this one?

        Show
        Claus Ibsen added a comment - Stephen, any update on this one?
        Hide
        Claus Ibsen added a comment - - edited

        Stephen, Hadrian

        We cannot have imports to Spring .jars in camel-core.jar. We need to use reflection or other techniques to avoid having the import
        import org.springframework.jmx.export.annotation.ManagedResource

        You can for example use: camelContext.getClassResolver
        to lookup the class at runtime.

        This allows us to run Camel where people dont have Spring jars.

        Show
        Claus Ibsen added a comment - - edited Stephen, Hadrian We cannot have imports to Spring .jars in camel-core.jar. We need to use reflection or other techniques to avoid having the import import org.springframework.jmx.export.annotation.ManagedResource You can for example use: camelContext.getClassResolver to lookup the class at runtime. This allows us to run Camel where people dont have Spring jars.
        Hide
        Stephen Mullins added a comment -

        patch is attached. This is my first time so please let me know if I've messed something up.

        Show
        Stephen Mullins added a comment - patch is attached. This is my first time so please let me know if I've messed something up.
        Hide
        Claus Ibsen added a comment -
        Show
        Claus Ibsen added a comment - Stephen is working on a patch See nabble: http://www.nabble.com/Adding-custom-mbeans-to-camel-JMX-mbeanserver-td22421517s22882.html

          People

          • Assignee:
            Claus Ibsen
            Reporter:
            Stephen Mullins
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 10h
              10h
              Remaining:
              Remaining Estimate - 10h
              10h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development