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 <vivek.tha...@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: cib...@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/

Reply via email to