Re: JMX Camel New User Question: where do I put service:jmx:rmi...
Thank you Quinn, it does help. That's exactly what I was looking for.
It would have taken me a while to figure out the proper syntax
Now I just have to figure out how to add credentials. Can I add them
into this "from" line
or need I do something else like
environment.put (JMXConnector.CREDENTIALS, credentials);
(from: https://docs.oracle.com/cd/E19717-01/819-7758/gchjy/index.html )
If there's TFM I should Read, feel free to point me at it.
(I'd just go and test my first thought above with the URI but the
service I'm trying to work with has gone down since I last looked at
it.... working on getting that fixed.)
On Thu, Dec 20, 2018 at 6:44 PM Quinn Stevenson
> Find your JMX URI for ActiveMQ - it will look something like
> Then the from should be something like
> > On Dec 19, 2018, at 9:40 PM, RW <roadworrier@xxxxxxxxx> wrote:
> > 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