You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by vivekt <vi...@gmail.com> on 2015/03/02 08:20:56 UTC

Re: camel-metrics Component

Hello Claus,

Thank you again for your reply. The code in java works and I can get the
counter metrics values in MetricRegistry.

I am now trying to figure out how can I create a bean in blueprint of
SimpleRegistry which extends type HashMap.
So far, I have this.

<bean id="metricsRegistry" class="com.codahale.metrics.MetricsRegistry"/>
<bean id="simpleRegistry" class="org.apache.camel.impl.SimpleRegistry">
   <entry key="metricsRegistry" value-ref = "metricsRegistry" />
</bean>

Also, I am not sure how can I instantiate DefaultCamelContext and set
SimpleRegistry in the constructor within blueprint (or even spring)

It would be great if you can suggest the way to do it.

Thanks,

Vivek



--
View this message in context: http://camel.465427.n5.nabble.com/camel-metrics-Component-tp5758627p5763357.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel-metrics Component

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Ah in blueprint its easier just declare a <bean> with
id="metricsRegistry" and its shared, eg.

<bean id="metricsRegistry" class="com.codahale.metrics.MetricsRegistry"/>

its the name metricsRegistry that has a special meaning

On Mon, Mar 2, 2015 at 8:20 AM, vivekt <vi...@gmail.com> wrote:
> Hello Claus,
>
> Thank you again for your reply. The code in java works and I can get the
> counter metrics values in MetricRegistry.
>
> I am now trying to figure out how can I create a bean in blueprint of
> SimpleRegistry which extends type HashMap.
> So far, I have this.
>
> <bean id="metricsRegistry" class="com.codahale.metrics.MetricsRegistry"/>
> <bean id="simpleRegistry" class="org.apache.camel.impl.SimpleRegistry">
>    <entry key="metricsRegistry" value-ref = "metricsRegistry" />
> </bean>
>
> Also, I am not sure how can I instantiate DefaultCamelContext and set
> SimpleRegistry in the constructor within blueprint (or even spring)
>
> It would be great if you can suggest the way to do it.
>
> Thanks,
>
> Vivek
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/camel-metrics-Component-tp5758627p5763357.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/