You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by bu...@apache.org on 2013/05/24 17:34:55 UTC
svn commit: r862999 - in /websites/staging/aries/trunk/content: ./
modules/jmx.html
Author: buildbot
Date: Fri May 24 15:34:54 2013
New Revision: 862999
Log:
Staging update by buildbot for aries
Modified:
websites/staging/aries/trunk/content/ (props changed)
websites/staging/aries/trunk/content/modules/jmx.html
Propchange: websites/staging/aries/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Fri May 24 15:34:54 2013
@@ -1 +1 @@
-1486088
+1486092
Modified: websites/staging/aries/trunk/content/modules/jmx.html
==============================================================================
--- websites/staging/aries/trunk/content/modules/jmx.html (original)
+++ websites/staging/aries/trunk/content/modules/jmx.html Fri May 24 15:34:54 2013
@@ -272,8 +272,47 @@
</td>
<td height="100%" width="100%">
<!-- Content -->
- <div class="wiki-content"><p>JMX</p>
-<p>This page describes the Aries JMX component. </p></div>
+ <div class="wiki-content"><h1 id="jmx">JMX</h1>
+<p>This page describes the Aries JMX component. </p>
+<p>The Aries JMX component is the Reference Implementation of the
+OSGi JMX Management Model Specification, chapter 124 in the
+<a href="http://www.osgi.org/Download/Release5">OSGi Enterprise Specification</a>.</p>
+<h2 id="getting-started">Getting Started</h2>
+<p>To use the Aries JMX component, obtain the following:</p>
+<ul>
+<li>The Aries JMX bundle, e.g. from Maven Central: <a href="http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22org.apache.aries.jmx%22">org.apache.aries.jmx</a></li>
+<li>The Aries Util bundle, e.g. from Maven Central: <a href="http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22org.apache.aries.util%22">org.apache.aries.util</a></li>
+</ul>
+<p>As prescribed by the OSGi JMX specification, to hook it in with an MBean Server the relevant MBean Server needs to be registered in the OSGi Service Registry.</p>
+<p>The easiest way to get things to do this is to use the platform mbean server, and register that. For example create a simple bundle that contains the following Bundle Activator:</p>
+<pre>import java.lang.management.ManagementFactory;
+import javax.management.MBeanServer;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class Activator implements BundleActivator {
+ public void start(BundleContext context) throws Exception {
+ MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
+ context.registerService(MBeanServer.class.getName(), mbs, null);
+ }
+
+ public void stop(BundleContext context) throws Exception {}
+}</pre>
+
+<p>Then install the Aries JMX Bundle and the Aries Util Bundle and start everything:
+<pre>g! lb
+START LEVEL 1
+ ID|State |Level|Name
+ 0|Active | 0|System Bundle (4.2.1)
+ 1|Active | 1|Apache Felix Bundle Repository (1.6.6)
+ 2|Active | 1|Apache Felix Gogo Command (0.12.0)
+ 3|Active | 1|Apache Felix Gogo Runtime (0.10.0)
+ 4|Active | 1|Apache Felix Gogo Shell (0.10.0)
+ 5|Active | 1|My Glue Activator (1.0.0)
+ 6|Active | 1|Apache Aries JMX Bundle (1.1.1)
+ 7|Active | 1|Apache Aries Util (1.1.0)
+</pre></p>
+<p>Now you can access the OSGi functionality through MBeans, for example via jconsole:</p></div>
<!-- Content -->
</td>
</tr>