git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JMX Camel New User Question: where do I put service:jmx:rmi...


If I remove "service" before "jmx" I get:

"Must specify domain" in my error. I actually am using the fully qualified domain name, not localhost, so that's not the issue...

and if I further remove :12345/jmxrm I still get the same error about needing a domain.

Hi All -

I'm new to Camel. I'm trying to work through this example in the way
of something like Hello World for a JMX Camel connection.

https://github.com/apache/camel/tree/master/examples/camel-example-jmx

I can build it with maven and mvn camel:run works fine.

But now I want to start tweaking the program to learn how it works and
applies to my own environment. There's a JMX server here for ActiveMQ,
and I want to connect to it with this example.

I'm thinking I do this with the RouteBuilder. (MyRouteBuilder.java in
this example)

There's a "from" line. This looks like the candidate.

// START SNIPPET: e1
from("jmx:platform?objectDomain=jmxExample&key.name=simpleBean").
to("log:jmxEvent");
// END SNIPPET: e1

but how do I put my URI in here? It looks something like:
service:jmx:rmi:///jndi/rmi://localhost:12345/jmxrmi

I wouldn't expect just pasting it in to the "from" area would work,
and it doesn't:
Failed to resolve endpoint:
service://jmx:rmi:///jndi/rmi://localhost:12345/jmxrmi due to: No
component found with scheme: service

I should also mention that I need to authenticate, so I have a
username and password I'll need to enter as well (though no SSL). Am I
looking in the right place in this example code?

Thanks. I know new-user questions can be painful to endure, so thanks
for your patience.

RW