Implement StaticService and then it uses the class name as the mbean name, eg AuditEventNotifier
On Thu, Jul 30, 2015 at 3:47 AM, SteveR <[email protected]> wrote: > I'm using Camel 2.14 and I have an AuditEventNotifier to notify about slow > exchanges: > > // > -------------------------------------------------------------------------------------- > // Add the custom AuditEventNotifier to the CamelContext > // See > http://camel.apache.org/eventnotifier-to-log-details-about-all-sent-exchanges.html > // > -------------------------------------------------------------------------------------- > Long maxElapsedMillis = > mainConfig.getCamelConfig().getCamelAuditEventMaxElapsedMillis(); > *camelContext.getManagementStrategy().addEventNotifier(new > AuditEventNotifier(maxElapsedMillis));* > logger.info("Added AuditEventNotifier management strategy to > Camel context = {} " + > "with maxElapsedMillis = {}", > camelContext.getName(), maxElapsedMillis); > > > Is there any way to give an EventNotifer a name so that it shows up that way > in JConsole or VisualVM? > > Currently, VisualVM displays it as *EventNotifier(0xbd8c9ab)* > > Thanks, Steve > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/How-to-name-an-EventNotifier-so-it-shows-up-in-JConsole-tp5770092.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2nd edition: http://www.manning.com/ibsen2
