This post originated from an RSS feed registered with Java Buzz
by Andrej Koelewijn.
Original Post: Listing Camel Routes using JMX and Groovy
Feed Title: Andrej Koelewijn
Feed URL: http://feeds.feedburner.com/AndrejKoelewijn
Feed Description: On Oracle, Java and OpenSource
The following groovy script can be used to list all Camel routes on a running servicemix. Per route it will display state of the route, and some statistics. import javax.management.* import javax.management.remote.* import javax.lang.management.* def serverUrl = 'service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-root' def env = [(JMXConnector.CREDENTIALS): ["smx","smx"] as String[]] def jmxUrl = new JMXServiceURL(serverUrl) def connect = JMXConnectorFactory.connect(jmxUrl,env) def [...]