camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r960842 - in /websites/production/camel/content: cache/main.pageCache camel-jmx.html
Date Wed, 05 Aug 2015 08:20:02 GMT
Author: buildbot
Date: Wed Aug  5 08:20:02 2015
New Revision: 960842

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/camel-jmx.html

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/camel/content/camel-jmx.html
==============================================================================
--- websites/production/camel/content/camel-jmx.html (original)
+++ websites/production/camel/content/camel-jmx.html Wed Aug  5 08:20:02 2015
@@ -207,7 +207,7 @@ java.lang.SecurityException: Unauthorize
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[SUNJMX=-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.port=1616 \
 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
 ]]></script>
-</div></div><p>(The SUNJMX environment variable is simple used by the startup
script for Camel, as additional startup parameters for the JVM. If you start Camel directly,
you'll have to pass these parameters yourself.)</p><h4 id="CamelJMX-jmxAgentPropertiesReference">jmxAgent
Properties Reference</h4><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p>Spring property</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>System property</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>id</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The JMX agent name, and it is not
optional</p></td></tr><tr>
 <td colspan="1" rowspan="1" class="confluenceTd"><p><code>usePlatformMBeanServer</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.usePlatformMBeanServer</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code>, <code>true</code>
- Release 1.5 or later</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If
<code>true</code>, it will use the <code>MBeanServer</code> from the
JVM</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>mbeanServerDefaultDomain</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.mbeanServerDefaultDomain</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The default JMX domain of the <code>MBeanServer</code></p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>mbeanObjectDomainName</code><
 /p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.mbeanObjectDomainName</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The JMX domain that all object names
will use</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>createConnector</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.createRmiConnect</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>If we should create a JMX connector
(to allow remote management) for the <code>MBeanServer</code></p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>registryPort</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.rmiConnector.registryPort</code></p></td><td
colspan="1" 
 rowspan="1" class="confluenceTd"><p><code>1099</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The port that the JMX RMI registry
will use</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>connectorPort</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.rmiConnector.connectorPort</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>-1 (dynamic)</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The port that the JMX RMI server
will use</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>serviceUrlPath</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.serviceUrlPath</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>/jmxrmi/camel</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The path that JMX connector will
be registered under</p></td></tr><tr><td colspan="1" rowspan=
 "1" class="confluenceTd"><p><code>onlyRegisterProcessorWithCustomId</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.onlyRegisterProcessorWithCustomId</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.0:</strong>
If this option is enabled then only processors with a custom id set will be registered. This
allows you to filer out unwanted processors in the JMX console.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>statisticsLevel</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>All / Default</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.1:</strong>
Configures the level for whether performance statistics is enabled for the MBean. See section
<em>Configuring level of granularity
  for performance statistics</em> for more details. From <strong>Camel 2.16</strong>
onwards the All option is renamed to Default, and a new Extended option has been introduced
which allows gathered additional runtime JMX metrics.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>includeHostName</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.includeHostName</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.13:</strong>
Whether to include the hostname in the MBean naming. From Camel 2.13 onwards this is default
<code>false</code>, where as in older releases its default <code>true</code>.
You can use this option to restore old behavior if really needed.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>loadStatisticsEnabled</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>org.ap
 ache.camel.jmx.loadStatisticsEnabled</code></td><td colspan="1" rowspan="1"
class="confluenceTd"><code>false</code></td><td colspan="1" rowspan="1"
class="confluenceTd"><strong>Camel 2.16:</strong>Whether load statistics is
enabled (gathers load statistics using a background thread per CamelContext).</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>endpointRuntimeStatisticsEnabled</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>org.apache.camel.jmx.endpointRuntimeStatisticsEnabled</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>true</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong> Whether
endpoint runtime statistics is enabled (gathers runtime usage of each incoming and outgoing
endpoints).</td></tr></tbody></table></div><h4 id="CamelJMX-ConfiguringwhethertoregisterMBeansalways,fornewroutesorjustbydefault">Configuring
whether to register MBeans always, for new routes or just by default</h4
 ><p><strong>Available as of Camel 2.7</strong></p><p>Camel
now offers 2 settings to control whether or not to register mbeans</p><div class="table-wrap"><table
class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Option</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>Default</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>registerAlways</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>If enabled then MBeans is always
registered.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>registerNewRoutes</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>If enabled then adding new routes
after <a shape="rect" href="camelcontext.html">Cam
 elContext</a> has been started will also register MBeans from that given route.</p></td></tr></tbody></table></div><p>By
default Camel registers MBeans for all the routes configured when its starting. The <code>registerNewRoutes</code>
option control if MBeans should also be registered if you add new routes thereafter. You can
disable this, if you for example add and remove temporary routes where management is not needed.</p><p>Be
a bit caution to use the <code>registerAlways</code> option when using dynamic
<a shape="rect" href="eip.html">EIP</a> patterns such as the <a shape="rect"
href="recipient-list.html">Recipient List</a> having unique endpoints. If so then
each unique endpoint and its associated services/producers would also be registered. This
could potential lead to system degration due the rising number of mbeans in the registry.
A MBean is not a light-weight object and thus consumes memory.</p><h3 id="CamelJMX-MonitoringCamelusingJMX">Monitoring
Camel using JMX</h3><h4 i
 d="CamelJMX-UsingJConsoletomonitorCamel">Using JConsole to monitor Camel</h4><p>The
<code>CamelContext</code> should appear in the list of local connections, if you
are running JConsole on the same host as Camel.</p><p>To connect to a remote Camel
instance, or if the local process does not show up, use Remote Process option, and enter an
URL. Here is an example localhost URL:service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi/camel</p><p>Using
the Apache Camel with JConsole</p><p><span class="confluence-embedded-file-wrapper"><img
class="confluence-embedded-image confluence-content-image-border" src="camel-jmx.data/camel-jmx.png"
data-image-src="/confluence/download/attachments/85697/camel-jmx.png?version=1&amp;modificationDate=1224680681000&amp;api=v2"
data-unresolved-comment-count="0" data-linked-resource-id="9224" data-linked-resource-version="1"
data-linked-resource-type="attachment" data-linked-resource-default-alias="camel-jmx.png"
data-base-url="https://cwiki.apache.org/confl
 uence" data-linked-resource-content-type="image/png" data-linked-resource-container-id="85697"
data-linked-resource-container-version="78"></span></p><h4 id="CamelJMX-Whichendpointsareregistered">Which
endpoints are registered</h4><p>In <strong>Camel 2.1</strong> onwards
<strong>only</strong> <code>singleton</code> endpoints are registered
as the overhead for non singleton will be substantial in cases where thousands or millions
of endpoints are used. This can happens when using a <a shape="rect" href="recipient-list.html">Recipient
List</a> EIP or from a <code>ProducerTemplate</code> that sends a lot of
messages.</p><h4 id="CamelJMX-Whichprocessorsareregistered">Which processors are
registered</h4><p>See <a shape="rect" href="why-is-my-processor-not-showing-up-in-jconsole.html">this
FAQ</a>.</p><h4 id="CamelJMX-HowtousetheJMXNotificationListenertolistenthecamelevents?">How
to use the JMX NotificationListener to listen the camel events?</h4><p>The Camel
notification events give a co
 arse grained overview what is happening. You can see lifecycle event from context and endpoints
and you can see exchanges being received by and sent to endpoints.</p><p>From
<strong>Camel 2.4</strong> you can use a custom JMX NotificationListener to listen
the camel events.<br clear="none"> First you need to set up a JmxNotificationEventNotifier
before you start the CamelContext.</p><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
+</div></div><p>(The SUNJMX environment variable is simple used by the startup
script for Camel, as additional startup parameters for the JVM. If you start Camel directly,
you'll have to pass these parameters yourself.)</p><h4 id="CamelJMX-jmxAgentPropertiesReference">jmxAgent
Properties Reference</h4><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p>Spring property</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>System property</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>id</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The JMX agent name, and it is not
optional</p></td></tr><tr>
 <td colspan="1" rowspan="1" class="confluenceTd"><p><code>usePlatformMBeanServer</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.usePlatformMBeanServer</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code>, <code>true</code>
- Release 1.5 or later</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>If
<code>true</code>, it will use the <code>MBeanServer</code> from the
JVM</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>mbeanServerDefaultDomain</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.mbeanServerDefaultDomain</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The default JMX domain of the <code>MBeanServer</code></p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>mbeanObjectDomainName</code><
 /p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.mbeanObjectDomainName</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The JMX domain that all object names
will use</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>createConnector</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.createRmiConnect</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>If we should create a JMX connector
(to allow remote management) for the <code>MBeanServer</code></p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>registryPort</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.rmiConnector.registryPort</code></p></td><td
colspan="1" 
 rowspan="1" class="confluenceTd"><p><code>1099</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The port that the JMX RMI registry
will use</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>connectorPort</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.rmiConnector.connectorPort</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>-1 (dynamic)</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The port that the JMX RMI server
will use</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>serviceUrlPath</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.serviceUrlPath</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>/jmxrmi/camel</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>The path that JMX connector will
be registered under</p></td></tr><tr><td colspan="1" rowspan=
 "1" class="confluenceTd"><p><code>onlyRegisterProcessorWithCustomId</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.onlyRegisterProcessorWithCustomId</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>false</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.0:</strong>
If this option is enabled then only processors with a custom id set will be registered. This
allows you to filer out unwanted processors in the JMX console.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>statisticsLevel</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>All / Default</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.1:</strong>
Configures the level for whether performance statistics is enabled for the MBean. See section
<em>Configuring level of granularity
  for performance statistics</em> for more details. From <strong>Camel 2.16</strong>
onwards the All option is renamed to Default, and a new Extended option has been introduced
which allows gathered additional runtime JMX metrics.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>includeHostName</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.jmx.includeHostName</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>&#160;</p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.13:</strong>
Whether to include the hostname in the MBean naming. From Camel 2.13 onwards this is default
<code>false</code>, where as in older releases its default <code>true</code>.
You can use this option to restore old behavior if really needed.</p></td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>useHostIPAddress</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>org.apache.
 camel.jmx.useHostIPAddress</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong> Whether
to use hostname or IP Address in the service url when creating the remote connector. By default
the hostname will be used.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><code>loadStatisticsEnabled</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>org.apache.camel.jmx.loadStatisticsEnabled</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>false</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong>Whether
load statistics is enabled (gathers load statistics using a background thread per CamelContext).</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><code>endpointRuntimeStatisticsEnabled</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><code>org.apache.camel.jmx.endpointRuntimeStatisticsE
 nabled</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>true</code></td><td
colspan="1" rowspan="1" class="confluenceTd"><strong>Camel 2.16:</strong> Whether
endpoint runtime statistics is enabled (gathers runtime usage of each incoming and outgoing
endpoints).</td></tr></tbody></table></div><h4 id="CamelJMX-ConfiguringwhethertoregisterMBeansalways,fornewroutesorjustbydefault">Configuring
whether to register MBeans always, for new routes or just by default</h4><p><strong>Available
as of Camel 2.7</strong></p><p>Camel now offers 2 settings to control whether
or not to register mbeans</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th
colspan="1" rowspan="1" class="confluenceTh"><p>Option</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>Default</p></th><th
colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>registerAlways</code></p></td><td
colspan="1" r
 owspan="1" class="confluenceTd"><p><code>false</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>If enabled then MBeans is always
registered.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>registerNewRoutes</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p><code>true</code></p></td><td
colspan="1" rowspan="1" class="confluenceTd"><p>If enabled then adding new routes
after <a shape="rect" href="camelcontext.html">CamelContext</a> has been started
will also register MBeans from that given route.</p></td></tr></tbody></table></div><p>By
default Camel registers MBeans for all the routes configured when its starting. The <code>registerNewRoutes</code>
option control if MBeans should also be registered if you add new routes thereafter. You can
disable this, if you for example add and remove temporary routes where management is not needed.</p><p>Be
a bit caution to use the <code>registerAlways</code> option when using dynamic
<a
  shape="rect" href="eip.html">EIP</a> patterns such as the <a shape="rect" href="recipient-list.html">Recipient
List</a> having unique endpoints. If so then each unique endpoint and its associated
services/producers would also be registered. This could potential lead to system degration
due the rising number of mbeans in the registry. A MBean is not a light-weight object and
thus consumes memory.</p><h3 id="CamelJMX-MonitoringCamelusingJMX">Monitoring
Camel using JMX</h3><h4 id="CamelJMX-UsingJConsoletomonitorCamel">Using JConsole
to monitor Camel</h4><p>The <code>CamelContext</code> should appear
in the list of local connections, if you are running JConsole on the same host as Camel.</p><p>To
connect to a remote Camel instance, or if the local process does not show up, use Remote Process
option, and enter an URL. Here is an example localhost URL:service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi/camel</p><p>Using
the Apache Camel with JConsole</p><p><span class="confluence-embedde
 d-file-wrapper"><img class="confluence-embedded-image confluence-content-image-border"
src="camel-jmx.data/camel-jmx.png" data-image-src="/confluence/download/attachments/85697/camel-jmx.png?version=1&amp;modificationDate=1224680681000&amp;api=v2"
data-unresolved-comment-count="0" data-linked-resource-id="9224" data-linked-resource-version="1"
data-linked-resource-type="attachment" data-linked-resource-default-alias="camel-jmx.png"
data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png"
data-linked-resource-container-id="85697" data-linked-resource-container-version="79"></span></p><h4
id="CamelJMX-Whichendpointsareregistered">Which endpoints are registered</h4><p>In
<strong>Camel 2.1</strong> onwards <strong>only</strong> <code>singleton</code>
endpoints are registered as the overhead for non singleton will be substantial in cases where
thousands or millions of endpoints are used. This can happens when using a <a shape="rect"
href="recipien
 t-list.html">Recipient List</a> EIP or from a <code>ProducerTemplate</code>
that sends a lot of messages.</p><h4 id="CamelJMX-Whichprocessorsareregistered">Which
processors are registered</h4><p>See <a shape="rect" href="why-is-my-processor-not-showing-up-in-jconsole.html">this
FAQ</a>.</p><h4 id="CamelJMX-HowtousetheJMXNotificationListenertolistenthecamelevents?">How
to use the JMX NotificationListener to listen the camel events?</h4><p>The Camel
notification events give a coarse grained overview what is happening. You can see lifecycle
event from context and endpoints and you can see exchanges being received by and sent to endpoints.</p><p>From
<strong>Camel 2.4</strong> you can use a custom JMX NotificationListener to listen
the camel events.<br clear="none"> First you need to set up a JmxNotificationEventNotifier
before you start the CamelContext.</p><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
 // Set up the JmxNotificationEventNotifier
 notifier = new JmxNotificationEventNotifier();
@@ -240,7 +240,7 @@ context.getManagementStrategy().getManag
     }, null);
 
 ]]></script>
-</div></div><h4 id="CamelJMX-UsingtheTracerMBeantogetfinegrainedtracing">Using
the Tracer MBean to get fine grained tracing</h4><p>Additionally to the coarse
grained notifications above <strong>Camel 2.9.0</strong> support JMX Notification
for fine grained trace events.<br clear="none"> These can be found in the Tracer MBean.
To activate fine grained tracing you first need to activate tracing on the context or on a
route.<br clear="none"> This can either be done when configuring the context or on the
context / route MBeans.</p><p>As a second step you have to set the <code>jmxTraceNotifications</code>
attribute to <code>true</code> on the tracer. This can again be done when configuring
the context or at runtime on the tracer MBean.</p><p>Now you can register for
TraceEvent Notifications on the Tracer MBean using JConsole. There will be one Notification
for every step on the route with all exchange and message details.</p><p><span
class="confluence-embedded-file-wrapper"><img class="c
 onfluence-embedded-image confluence-content-image-border" src="camel-jmx.data/jconsole_trace_notifications.png"
data-image-src="/confluence/download/attachments/85697/jconsole_trace_notifications.png?version=1&amp;modificationDate=1317961747000&amp;api=v2"
data-unresolved-comment-count="0" data-linked-resource-id="28016788" data-linked-resource-version="1"
data-linked-resource-type="attachment" data-linked-resource-default-alias="jconsole_trace_notifications.png"
data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png"
data-linked-resource-container-id="85697" data-linked-resource-container-version="78"></span></p><h3
id="CamelJMX-UsingJMXforyourownCamelCode">Using JMX for your own Camel Code</h3><h4
id="CamelJMX-RegisteringyourownManagedEndpoints">Registering your own Managed Endpoints</h4><p><strong>Available
as of Camel 2.0</strong><br clear="none"> You can decorate your own endpoints
with Spring managed annotations <code>@ManagedResource<
 /code> to allow to register them in the Camel <code>MBeanServer</code> and
thus access your custom MBeans using JMX.<br clear="none"> <strong>Notice:</strong>
in <strong>Camel 2.1</strong> we have changed this to apply other than just endpoints
but then you need to implement the interface <code>org.apache.camel.spi.ManagementAware</code>
as well. More about this later.</p><p>For example we have the following custom
endpoint where we define some options to be managed:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h4 id="CamelJMX-UsingtheTracerMBeantogetfinegrainedtracing">Using
the Tracer MBean to get fine grained tracing</h4><p>Additionally to the coarse
grained notifications above <strong>Camel 2.9.0</strong> support JMX Notification
for fine grained trace events.<br clear="none"> These can be found in the Tracer MBean.
To activate fine grained tracing you first need to activate tracing on the context or on a
route.<br clear="none"> This can either be done when configuring the context or on the
context / route MBeans.</p><p>As a second step you have to set the <code>jmxTraceNotifications</code>
attribute to <code>true</code> on the tracer. This can again be done when configuring
the context or at runtime on the tracer MBean.</p><p>Now you can register for
TraceEvent Notifications on the Tracer MBean using JConsole. There will be one Notification
for every step on the route with all exchange and message details.</p><p><span
class="confluence-embedded-file-wrapper"><img class="c
 onfluence-embedded-image confluence-content-image-border" src="camel-jmx.data/jconsole_trace_notifications.png"
data-image-src="/confluence/download/attachments/85697/jconsole_trace_notifications.png?version=1&amp;modificationDate=1317961747000&amp;api=v2"
data-unresolved-comment-count="0" data-linked-resource-id="28016788" data-linked-resource-version="1"
data-linked-resource-type="attachment" data-linked-resource-default-alias="jconsole_trace_notifications.png"
data-base-url="https://cwiki.apache.org/confluence" data-linked-resource-content-type="image/png"
data-linked-resource-container-id="85697" data-linked-resource-container-version="79"></span></p><h3
id="CamelJMX-UsingJMXforyourownCamelCode">Using JMX for your own Camel Code</h3><h4
id="CamelJMX-RegisteringyourownManagedEndpoints">Registering your own Managed Endpoints</h4><p><strong>Available
as of Camel 2.0</strong><br clear="none"> You can decorate your own endpoints
with Spring managed annotations <code>@ManagedResource<
 /code> to allow to register them in the Camel <code>MBeanServer</code> and
thus access your custom MBeans using JMX.<br clear="none"> <strong>Notice:</strong>
in <strong>Camel 2.1</strong> we have changed this to apply other than just endpoints
but then you need to implement the interface <code>org.apache.camel.spi.ManagementAware</code>
as well. More about this later.</p><p>For example we have the following custom
endpoint where we define some options to be managed:</p><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
 @ManagedResource(description = &quot;Our custom managed endpoint&quot;)
 public class CustomEndpoint extends MockEndpoint implements ManagementAware&lt;CustomEndpoint&gt;
{



Mime
View raw message