You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by blommish <jo...@gmail.com> on 2015/03/24 09:42:26 UTC
JMX objectname of processors MBeans
Hi,
I have a Processor defined as the following,
@ManagedResource(description = "Wiretap value")
public class WiretapValue implements Processor {
But to actually be able to see this in Jconsole, I can't use .process() in
my routebuilder but need to use
.bean((WiretapValue)
getContext().getRegistry().lookupByName("wiretapValue"))
I am not using Spring and adding it to the registry by:
main.bind("wiretapValue", new WiretapValue());
*Anyhow*,
In JConsole this now pops up as "bean2", in org.apache.camel -> processors
-> camel-1 -> bean2, it has the correct description but is it possible to
have another name?? Making it unique and easier to locate?
--
View this message in context: http://camel.465427.n5.nabble.com/JMX-objectname-of-processors-MBeans-tp5764684.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: JMX objectname of processors MBeans
Posted by Claus Ibsen <cl...@gmail.com>.
Set the id in the route
.bean(xxx).id("myNameHere")
On Tue, Mar 24, 2015 at 2:48 PM, blommish <jo...@gmail.com> wrote:
> That does not help as I can see it.
>
> What I would like to do is to set the ID, since the
> objectName=...name="bean-2", the name is the ID
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/JMX-objectname-of-processors-MBeans-tp5764684p5764696.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/
Re: JMX objectname of processors MBeans
Posted by blommish <jo...@gmail.com>.
That does not help as I can see it.
What I would like to do is to set the ID, since the
objectName=...name="bean-2", the name is the ID
--
View this message in context: http://camel.465427.n5.nabble.com/JMX-objectname-of-processors-MBeans-tp5764684p5764696.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: JMX objectname of processors MBeans
Posted by Claus Ibsen <cl...@gmail.com>.
Your class should extend ServiceSupport
On Tue, Mar 24, 2015 at 9:42 AM, blommish <jo...@gmail.com> wrote:
> Hi,
>
> I have a Processor defined as the following,
>
> @ManagedResource(description = "Wiretap value")
> public class WiretapValue implements Processor {
>
> But to actually be able to see this in Jconsole, I can't use .process() in
> my routebuilder but need to use
> .bean((WiretapValue)
> getContext().getRegistry().lookupByName("wiretapValue"))
>
> I am not using Spring and adding it to the registry by:
> main.bind("wiretapValue", new WiretapValue());
>
> *Anyhow*,
> In JConsole this now pops up as "bean2", in org.apache.camel -> processors
> -> camel-1 -> bean2, it has the correct description but is it possible to
> have another name?? Making it unique and easier to locate?
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/JMX-objectname-of-processors-MBeans-tp5764684.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/