<html>
<head>
<base href="http://cwiki.apache.org/confluence">
<link rel="stylesheet" href="/confluence/s/1810/9/1/_/styles/combined.css?spaceKey=CAMEL&forWysiwyg=true"
type="text/css">
</head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
<h2><a href="http://cwiki.apache.org/confluence/display/CAMEL/How+do+I+disable+JMX">How
do I disable JMX</a></h2>
<h4>Page <b>edited</b> by <a href="http://cwiki.apache.org/confluence/display/~janstey">Jonathan
Anstey</a>
</h4>
<br/>
<h4>Changes (6)</h4>
<div id="page-diffs">
<table class="diff" cellpadding="0" cellspacing="0">
<tr><td class="diff-unchanged" >h2. How do I disable JMX? <br>
<br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">The
easiest way to disable JMX support is via the *jmxAgent* property on the Camel Context element
in your Spring XML <br> <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">You
can disable JMX instrumentation agent by setting Java VM system property as follow. The property
value is treated as boolean. <br></td></tr>
<tr><td class="diff-unchanged" >{code} <br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">
<camelContext xmlns="http://activemq.apache.org/camel/schema/spring">
<br> <jmxAgent id="agent" disabled="true"/>
<br></td></tr>
<tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">...</span>
<span class="diff-added-words"style="background-color: #dfd;">-Dorg.apache.camel.jmx.disabled=true</span>
<br></td></tr>
<tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">
</camelContext> <br></td></tr>
<tr><td class="diff-unchanged" >{code} <br></td></tr>
<tr><td class="diff-added-lines" style="background-color: #dfd;">Or,
by adding a jmxAgent element inside the camelContext element in Spring configuration: <br>{code}
<br><camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
<br> <jmxAgent id="agent" disabled="true"/>
<br> ... <br></camelContext> <br>{code} <br>Or in
Camel 2.1 its a bit easier (not having to use JVM system property) if using pure Java as you
can disable it as follows: <br>{code} <br>CamelContext camel = new DefaultCamelContext();
<br>camel.disableJMX(); <br>{code} <br></td></tr>
</table>
</div> <h4>Full Content</h4>
<div class="notificationGreySide">
<h2><a name="HowdoIdisableJMX-HowdoIdisableJMX%3F"></a>How do I
disable JMX?</h2>
<p>You can disable JMX instrumentation agent by setting Java VM system property as follow.
The property value is treated as boolean.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
-Dorg.apache.camel.jmx.disabled=<span class="code-keyword">true</span>
</pre>
</div></div>
<p>Or, by adding a jmxAgent element inside the camelContext element in Spring configuration:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
<camelContext id=<span class="code-quote">"camel"</span> xmlns=<span
class="code-quote">"http:<span class="code-comment">//camel.apache.org/schema/spring"</span>>
</span> <jmxAgent id=<span class="code-quote">"agent"</span> disabled=<span
class="code-quote">"<span class="code-keyword">true</span>"</span>/>
...
</camelContext>
</pre>
</div></div>
<p>Or in Camel 2.1 its a bit easier (not having to use JVM system property) if using
pure Java as you can disable it as follows:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
CamelContext camel = <span class="code-keyword">new</span> DefaultCamelContext();
camel.disableJMX();
</pre>
</div></div>
</div>
<div id="commentsSection" class="wiki-content pageSection">
<div style="float: right;">
<a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
</div>
<a href="http://cwiki.apache.org/confluence/display/CAMEL/How+do+I+disable+JMX">View
Online</a>
|
<a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=72858&revisedVersion=3&originalVersion=2">View
Changes</a>
|
<a href="http://cwiki.apache.org/confluence/display/CAMEL/How+do+I+disable+JMX?showComments=true&showCommentArea=true#addcomment">Add
Comment</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
|