cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache CXF Documentation > JMX Management
Date Wed, 09 Sep 2009 10:34:00 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CXF20DOC&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="http://cwiki.apache.org/confluence/display/CXF20DOC/JMX+Management">JMX
Management</a></h2>
     <h4>Page <b>edited</b> by             <a href="http://cwiki.apache.org/confluence/display/~eglynn">Eoghan
Glynn</a>
    </h4>
     Explicit upfront reference to the CounterRepository config
          <div id="versionComment" class="noteMacro" style="display:none; padding: 5px;">
     Explicit upfront reference to the CounterRepository config<br />
     </div>
          <br/>
     <div class="notificationGreySide">
         <h1><a name="JMXManagement-HowtoenabletheCXFinstrumentationManager"></a>How
to enable the CXF instrumentationManager</h1>

<p>CXF Endpoints can be managed with JMX. You simply have add the following configuration
to your cxf.xml which will enable the CXF management module to work.</p>

<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>&lt;bean id="org.apache.cxf.management.InstrumentationManager"
  class="org.apache.cxf.management.jmx.InstrumentationManagerImpl"&gt;
  &lt;property name="bus" ref="cxf" /&gt;
  &lt;property name="enabled" value="true" /&gt;
  &lt;property name="threaded" value="false" /&gt;
  &lt;property name="daemon" value="false" /&gt;
  &lt;property name="JMXServiceURL" value="service:jmx:rmi:///jndi/rmi://localhost:9914/jmxrmi"
/&gt;
&lt;/bean&gt;
</pre>
</div></div>

<p>To avoid any unnecessary runtime overhead, the performance counters measuring response
time are disabled by default. Further <a href="#JMXManagement-responsetime">configuration</a>
is required to enable this instrumentation.</p>

<p>To test the configuration start up your service and connect to it by using jconsole
from the jdk.<br/>
<img src="/confluence/download/attachments/70534/jconsole_connect2.png" align="absmiddle"
border="0" /><br/>
&nbsp;<br/>
Then you can browse to your endpoint:<br/>
&nbsp;<br/>
<img src="/confluence/download/attachments/70534/jconsole_service_endpoint.png" align="absmiddle"
border="0" /><br/>
&nbsp;<br/>
&nbsp;</p>

<p><a name="JMXManagement-responsetime"></a> </p>
<h1><a name="JMXManagement-Howtogettherequestresponsehandlingtime%3F"></a>How
to get the request response handling time ?</h1>

<p>CXF management module also provides a feature which can get the ongoing message's
response time (the Time that CXF get the response - the Time that CXF get the request), since
we can't store each of the message handling time, we just store the longest response time
in the counter repository which you can use jconsole to look up.</p>

<p>Here is the configuration snippet of the that your should add into the cxf.xml</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>    &lt;!-- Wiring the counter repository --&gt; 
    &lt;bean id="CounterRepository" class="org.apache.cxf.management.counters.CounterRepository"&gt;
        &lt;property name="bus" ref="cxf" /&gt;        
    &lt;/bean&gt;
</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/CXF20DOC/JMX+Management">View
Online</a>
       |
       <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=70534&revisedVersion=7&originalVersion=6">View
Change</a>
              |
       <a href="http://cwiki.apache.org/confluence/display/CXF20DOC/JMX+Management?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message