On Tue, Feb 11, 2014 at 3:41 PM, MbeanUser <[email protected]> wrote:
> Thank you all very much for the responses. They have certainly given some
> inspiration and interesting reading.
>
> I have looked into Jolokia. It looks very promising in some ways, but might
> not be correct choice for me in others. My main concern is that I would like
> to hide JMX usage from the REST API user, as I feel JMX is very java
> specific and might introduce unnecessary overhead to users. In my dream
> scenario, I user could sit down and write a gui against my API without
> knowing anything about JMX at all.
>
> I am still looking into using jolokia in the control layer vs the standard
> javax.management.*;
> javax.management.JMX vs J4pClient is very interesting, but I need to
> research a bit more.
>
> Claus Ibsen. Thank you so much for the github link for hawt.io.
>
> This might be a bit more of a camel question than an actual Servicemix
> question. I do not know, if it warrants its own topic or not.
>
> I need to find all available components on my ServiceMix instance. That
> means all premade components file, timer, direct etc etc, but also all
> custom components added at runtime.
>

There is JMX API on CamelContextMBean a method call findComponentNames
that can be used to find all known camel components on the classpath
http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.html

We had some bugs in it, that was recently fixed, so you may need to
use latest release to have it properly work.

That api should return all the camel components that are in use, and
also the components that have been installed by are not currently
active in use. For example as you say you can only see the file
component because it in use in a Camel route. But this api will return
it regardless as the file component is from camel-core which is always
installed when you use Camel.

Another trick could be to read the camel features.xml (karaf may have
JMX API to expose those) as each camel feature is usually a camel
component you can use/install. eg camel-ftp is the ftp components, and
so forth.


> Looking a my locally running ServiceMix instance MBeanServer I found MBean
> type:
> org.apache.camel:type=components
> The only visible components however, are components that have been used. In
> my case I can only see a file component as I have deployed a route using
> that component. Is this even possible?
>
> Looking through the hawt github, I could only find things related to
> endpoints:
> https://github.com/hawtio/hawtio/blob/master/hawtio-web/src/main/webapp/app/camel/js/browseEndpoint.ts
>
> How do you handle creating a route. Looking here:
> https://github.com/hawtio/hawtio/blob/master/hawtio-web/src/main/webapp/app/camel/js/routes.ts
> You use Camel.addRouteXmlChildren($scope, routeXmlNode, nodes, links, null,
> 0, 0), which I guess is built on addOrUpdateRoutesFromXml("route in xml
> form") on a context mbean.
> How do you inform the user about what components are available for his
> route?
>

You need to handle this manually. For example using that api I mentioned before.


> Sorry for the long and perhaps poorly formulated question.
>
> Thank you in advance
>
>
>
> --
> View this message in context: 
> http://servicemix.396122.n5.nabble.com/Building-an-external-control-layer-is-JMX-the-right-choice-for-interfacing-and-monitoring-ServiceMix-tp5718933p5718991.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: [email protected]
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
Make your Camel applications look hawt, try: http://hawt.io

Reply via email to