camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: How to name an EventNotifier so it shows up in JConsole ...
Date Thu, 30 Jul 2015 05:44:50 GMT
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 <srichardson@vonage.com> 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

Mime
View raw message