camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Camel > How do I disable JMX
Date Wed, 12 May 2010 13:33:00 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1810/9/1/_/styles/combined.css?spaceKey=CAMEL&amp;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;">
 &lt;camelContext xmlns=&quot;http://activemq.apache.org/camel/schema/spring&quot;&gt;
<br>     &lt;jmxAgent id=&quot;agent&quot; disabled=&quot;true&quot;/&gt;
<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;">
 &lt;/camelContext&gt; <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>&lt;camelContext id=&quot;camel&quot; xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
<br>  &lt;jmxAgent id=&quot;agent&quot; disabled=&quot;true&quot;/&gt;
<br>    ... <br>&lt;/camelContext&gt; <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">
&lt;camelContext id=<span class="code-quote">"camel"</span> xmlns=<span
class="code-quote">"http:<span class="code-comment">//camel.apache.org/schema/spring"</span>&gt;
</span>  &lt;jmxAgent id=<span class="code-quote">"agent"</span> disabled=<span
class="code-quote">"<span class="code-keyword">true</span>"</span>/&gt;
    ...
&lt;/camelContext&gt;
</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&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message