jmx- annotated RouteBuilder not showing up in JConsole

228 views Asked by At

I tried to annotate a RouteBuilder with @ManagedResource and a method from it with @ManagedOperation but i can't find it in JConsole. The other classes including my annotated custom endpoint is showing up fine.

I am not sure if these annotations work with all kinds of classes within camel?! In my case the annotated RouteBuilder is some kind of central control class. Is does not contain a route but is loading several other RouteBuilders. It also adds global (context scope) exception handlers and adds a RoutePolicyFactory that centrally handles start up and control logic.

The methods i want to make available via JMX re method that start/stop certain groups of routes.

1

There are 1 answers

0
dermoritz On BEST ANSWER

for sake of completeness i add the answer i got an camel mailing list:

You have to simple implement Service or StaticService (for Singleton Services) and add it to CamelContext via addService.